PHP Класс Demo\Aspect\LoggingAspect

См. также: http://go.aopphp.com/blog/2013/07/21/implementing-logging-aspect-with-doctrine-annotations/
Наследование: implements Go\Aop\Aspect
Показать файл Открыть проект

Открытые методы

Метод Описание
beforeMethodExecution ( Go\Aop\Intercept\MethodInvocation $invocation ) This advice intercepts an execution of loggable methods

Описание методов

beforeMethodExecution() публичный Метод

We use "Before" type of advice to log only class name, method name and arguments before method execution. You can choose your own logger, for example, monolog or log4php. Also you can choose "After" or "Around" advice to access an return value from method. To inject logger into this aspect you can look at Warlock framework with DI+AOP
public beforeMethodExecution ( Go\Aop\Intercept\MethodInvocation $invocation )
$invocation Go\Aop\Intercept\MethodInvocation Invocation