PHP 클래스 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; }
상속: implements Go\Aop\Framework\OrderedAdvice
파일 보기 프로젝트 열기: goaop/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$localAdvicesCache array | Closur\Closure[] Local cache of advices for faster unserialization on big projects
$order integer Advice order

공개 메소드들

메소드 설명
getAdviceOrder ( ) : integer Returns the advice order
serializeAdvice ( Closure $adviceMethod ) : array Serialize advice method into array
unserializeAdvice ( array $adviceData ) : Closure Unserialize an advice

메소드 상세

getAdviceOrder() 공개 메소드

Returns the advice order
public getAdviceOrder ( ) : integer
리턴 integer

serializeAdvice() 공개 정적인 메소드

Serialize advice method into array
public static serializeAdvice ( Closure $adviceMethod ) : array
$adviceMethod Closure An advice for aspect
리턴 array

unserializeAdvice() 공개 정적인 메소드

Unserialize an advice
public static unserializeAdvice ( array $adviceData ) : Closure
$adviceData array Information about advice
리턴 Closure

프로퍼티 상세

$localAdvicesCache 보호되어 있는 정적으로 프로퍼티

Local cache of advices for faster unserialization on big projects
protected static array|Closure[],Closur $localAdvicesCache
리턴 array | Closur\Closure[]

$order 보호되어 있는 프로퍼티

Advice order
protected int $order
리턴 integer