PHP Class Go\Aop\Framework\BaseAdvice
This class describe an action taken by the AOP framework at a particular
joinpoint. Different types of advice include "around", "before" and "after"
advices.
Around advice is an advice that surrounds a joinpoint such as a method
invocation. This is the most powerful kind of advice. Around advices will
perform custom behavior before and after the method invocation. They are
responsible for choosing whether to proceed to the joinpoint or to shortcut
executing by returning their own return value or throwing an exception.
After and before advices are simple closures that will be invoked after and
before main invocation.
Framework model an advice as an PHP-closure interceptor, maintaining a
chain of interceptors "around" the joinpoint:
function (Joinpoint $joinPoint) {
echo 'Before action';
call chain here with Joinpoint->proceed() method
$result = $joinPoint->proceed();
echo 'After action';
return $result;
}
Exibir arquivo
Open project: goaop/framework
Class Usage Examples
Protected Properties
Public Methods
Method Details
getAdviceOrder()
public method
serializeAdvice()
public static method
Serialize advice method into array
unserializeAdvice()
public static method
Property Details
$localAdvicesCache protected_oe static_oe property
Local cache of advices for faster unserialization on big projects
protected static array|Closure[],Closur $localAdvicesCache |
return |
array | Closur\Closure[] |
|
$order protected_oe property
protected int $order |
return |
integer |
|