Go\Aop\Framework\BaseInterceptor::__construct PHP Method

__construct() public method

Default constructor for interceptor
public __construct ( Closure $adviceMethod, integer $order, string $pointcutExpression = '' )
$adviceMethod Closure Interceptor advice to call
$order integer Order of interceptor
$pointcutExpression string Pointcut expression or advice name
    public function __construct(Closure $adviceMethod, $order = 0, $pointcutExpression = '')
    {
        $this->adviceMethod = $adviceMethod;
        $this->order = $order;
        $this->pointcutExpression = $pointcutExpression;
    }

Usage Example

 /**
  * Default constructor for interceptor
  *
  * @param string $message Text message for error
  * @param int $level Level of error
  * @param Pointcut $pointcut Pointcut instance where interceptor should be called
  */
 public function __construct($message, $level, Pointcut $pointcut = null)
 {
     $adviceMethod = $this->getDeclareErrorAdvice();
     $this->message = $message;
     $this->level = $level;
     parent::__construct($adviceMethod, -256, $pointcut);
 }
All Usage Examples Of Go\Aop\Framework\BaseInterceptor::__construct