/** * The expansion step of Before creates a MethodCallWrapper * for each wrappableMethod in the methods listed in the Annotation's * parameters. * * @param string $class Classname the annotation is applied to. * @param mixed $reflection The Reflection(Class|Method|Property) object the annotation is applied to. * @param ClassDescriptor $descriptor The ClassDescriptor being manipulated. */ protected function expand($class, $reflection, $descriptor) { $methodName = $reflection->getName(); foreach ($this->values as $wrappableMethod) { $wrapper = new MethodCallWrapper(); $wrapper->addCallBefore($methodName); $descriptor->addWrapper($wrappableMethod, $wrapper); } }