public getClassesContainingMethodsAnnotatedWith ( string $annotationClassName ) : array | ||
$annotationClassName | string | The annotation class name for a method annotation |
return | array | An array of class names |
public function getClassesContainingMethodsAnnotatedWith($annotationClassName)
{
if (!$this->initialized) {
$this->initialize();
}
return isset($this->classesByMethodAnnotations[$annotationClassName]) ? array_keys($this->classesByMethodAnnotations[$annotationClassName]) : [];
}
/** * This method is used to optimize the matching process. * * @param ClassNameIndex $classNameIndex * @return ClassNameIndex */ public function reduceTargetClassNames(ClassNameIndex $classNameIndex) { $classNames = $this->reflectionService->getClassesContainingMethodsAnnotatedWith($this->annotation); $annotatedIndex = new ClassNameIndex(); $annotatedIndex->setClassNames($classNames); return $classNameIndex->intersect($annotatedIndex); }