PHP Class Demo\Aspect\LoggingAspect

See also: http://go.aopphp.com/blog/2013/07/21/implementing-logging-aspect-with-doctrine-annotations/
Inheritance: implements Go\Aop\Aspect
Datei anzeigen Open project: goaop/framework

Public Methods

Method Description
beforeMethodExecution ( Go\Aop\Intercept\MethodInvocation $invocation ) This advice intercepts an execution of loggable methods

Method Details

beforeMethodExecution() public method

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