/** * Constructor for method invocation * * @param string $className Class name * @param string $methodName Method to invoke * @param $advices array List of advices for this invocation */ public function __construct($className, $methodName, array $advices) { parent::__construct($advices); $this->className = $className; $this->reflectionMethod = $method = new AnnotatedReflectionMethod($this->className, $methodName); // Give an access to call protected method if ($method->isProtected()) { $method->setAccessible(true); } }