class Advisor (View source)

An advisor is the combination of a single advice and the pointcut where the advice will become active.

Properties

protected AdviceInterface $advice

The advisor's advice

protected Pointcut $pointcut

The pointcut for the advice

Methods

__construct(AdviceInterface $advice, Pointcut $pointcut)

Initializes the advisor with an advice and a pointcut

getAdvice()

Returns the advisor's advice

getPointcut()

Returns the advisor's pointcut

Details

__construct(AdviceInterface $advice, Pointcut $pointcut)

Initializes the advisor with an advice and a pointcut

Parameters

AdviceInterface $advice

The advice to weave in

Pointcut $pointcut

The pointcut where the advice should be inserted

AdviceInterface getAdvice()

Returns the advisor's advice

Return Value

AdviceInterface

The advice

Pointcut getPointcut()

Returns the advisor's pointcut

Return Value

Pointcut

The pointcut