public function getClassNamesByAnnotation($annotationClassName) { if (!$this->initialized) { $this->initialize(); } $annotationClassName = $this->cleanClassName($annotationClassName); return isset($this->annotatedClasses[$annotationClassName]) ? array_keys($this->annotatedClasses[$annotationClassName]) : []; }
/** * This method is used to optimize the matching process. * * @param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex * @return \Neos\Flow\Aop\Builder\ClassNameIndex */ public function reduceTargetClassNames(\Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex) { $classNames = $this->reflectionService->getClassNamesByAnnotation(Flow\ValueObject::class); $annotatedIndex = new \Neos\Flow\Aop\Builder\ClassNameIndex(); $annotatedIndex->setClassNames($classNames); return $classNameIndex->intersect($annotatedIndex); }