PHP Class Demo\Aspect\FluentInterfaceAspect

Basically, it uses around method to intercept all public setters in the class that implements special marker interface FluentInterface. Then it checks the return value for setter, if it's null, then advice replaces it with reference to the object "$this".
See also: http://go.aopphp.com/blog/2013/03/19/implementing-fluent-interface-pattern-in-php/
Inheritance: implements Go\Aop\Aspect
Datei anzeigen Open project: goaop/framework

Protected Methods

Method Description
aroundMethodExecution ( Go\Aop\Intercept\MethodInvocation $invocation ) : mixed | null | object Fluent interface advice

Method Details

aroundMethodExecution() protected method

Fluent interface advice
protected aroundMethodExecution ( Go\Aop\Intercept\MethodInvocation $invocation ) : mixed | null | object
$invocation Go\Aop\Intercept\MethodInvocation
return mixed | null | object