PHP Class Go\Aop\Support\PointcutBuilder

Mostrar archivo Open project: goaop/framework

Protected Properties

Property Type Description
$container Go\Core\AspectContainer

Public Methods

Method Description
__construct ( Go\Core\AspectContainer $container ) Default constructor for the builder
after ( string $pointcutExpression, Closure $advice ) Declares the "After" hook for specific pointcut expression
afterThrowing ( string $pointcutExpression, Closure $advice ) Declares the "AfterThrowing" hook for specific pointcut expression
around ( string $pointcutExpression, Closure $advice ) Declares the "Around" hook for specific pointcut expression
before ( string $pointcutExpression, Closure $advice ) Declares the "Before" hook for specific pointcut expression
declareError ( string $pointcutExpression, string $message, integer $level = E_USER_ERROR ) Declares the error message for specific pointcut expression

Private Methods

Method Description
getPointcutId ( string $pointcutExpression ) : string Returns a unique name for pointcut expression
registerAdviceInContainer ( string $pointcutExpression, Go\Aop\Advice $advice ) General method to register advices

Method Details

__construct() public method

Default constructor for the builder
public __construct ( Go\Core\AspectContainer $container )
$container Go\Core\AspectContainer Instance of container

after() public method

Declares the "After" hook for specific pointcut expression
public after ( string $pointcutExpression, Closure $advice )
$pointcutExpression string Pointcut, e.g. "within(**)"
$advice Closure Advice to call

afterThrowing() public method

Declares the "AfterThrowing" hook for specific pointcut expression
public afterThrowing ( string $pointcutExpression, Closure $advice )
$pointcutExpression string Pointcut, e.g. "within(**)"
$advice Closure Advice to call

around() public method

Declares the "Around" hook for specific pointcut expression
public around ( string $pointcutExpression, Closure $advice )
$pointcutExpression string Pointcut, e.g. "within(**)"
$advice Closure Advice to call

before() public method

Declares the "Before" hook for specific pointcut expression
public before ( string $pointcutExpression, Closure $advice )
$pointcutExpression string Pointcut, e.g. "within(**)"
$advice Closure Advice to call

declareError() public method

Declares the error message for specific pointcut expression
public declareError ( string $pointcutExpression, string $message, integer $level = E_USER_ERROR )
$pointcutExpression string Pointcut, e.g. "within(**)"
$message string Error message to show
$level integer Error level to trigger

Property Details

$container protected_oe property

protected AspectContainer,Go\Core $container
return Go\Core\AspectContainer