1. Go to this page and download the library: Download quickmobile/go-aop-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quickmobile / go-aop-php example snippets
php
// app/ApplicationAspectKernel.php
use Go\Core\AspectKernel;
use Go\Core\AspectContainer;
/**
* Application Aspect Kernel
*/
class ApplicationAspectKernel extends AspectKernel
{
/**
* Configure an AspectContainer with advisors, aspects and pointcuts
*
* @param AspectContainer $container
*
* @return void
*/
protected function configureAop(AspectContainer $container)
{
}
}
php
// front-controller, for Symfony2 application it's web/app_dev.php
= ApplicationAspectKernel::getInstance();
$applicationAspectKernel->init(array(
'debug' => true, // use 'false' for production mode
// Cache directory
'cacheDir' => __DIR__ . '/path/to/cache/for/aop',
// Include paths restricts the directories where aspects should be applied, or empty for all source files
'
php
// app/ApplicationAspectKernel.php
use Aspect/MonitorAspect;
//...
protected function configureAop(AspectContainer $container)
{
$container->registerAspect(new MonitorAspect());
}
//...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.