PHP Класс Go\Aop\Support\PointcutBuilder

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$container Go\Core\AspectContainer

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
getPointcutId ( string $pointcutExpression ) : string Returns a unique name for pointcut expression
registerAdviceInContainer ( string $pointcutExpression, Go\Aop\Advice $advice ) General method to register advices

Описание методов

__construct() публичный Метод

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

after() публичный Метод

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() публичный Метод

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() публичный Метод

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() публичный Метод

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() публичный Метод

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

Описание свойств

$container защищенное свойство

protected AspectContainer,Go\Core $container
Результат Go\Core\AspectContainer