__construct() public method

Initializes an advisor with advice
public __construct ( Go\Aop\Advice $advice )
$advice Go\Aop\Advice Advice to apply
Exemplo n.º 1
0
 /**
  * Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.
  *
  * @param Pointcut $pointcut The Pointcut targeting the Advice
  * @param Advice $advice The Advice to run when Pointcut matches
  */
 public function __construct(Pointcut $pointcut, Advice $advice)
 {
     $this->pointcut = $pointcut;
     parent::__construct($advice);
 }
Exemplo n.º 2
0
 /**
  * Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.
  *
  * @param AspectContainer $container Instance of container
  * @param string $pointcutExpression The Pointcut targeting the Advice
  * @param Advice $advice The Advice to run when Pointcut matches
  */
 public function __construct(AspectContainer $container, $pointcutExpression, Advice $advice)
 {
     $this->container = $container;
     $this->pointcutExpression = $pointcutExpression;
     parent::__construct($advice);
 }