Neos\Flow\Reflection\ReflectionService::isClassReflected PHP Метод

isClassReflected() публичный Метод

Tells if the specified class is known to this reflection service and reflection information is available.
public isClassReflected ( string $className ) : boolean
$className string Name of the class
Результат boolean If the class is reflected by this service
    public function isClassReflected($className)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        $className = $this->cleanClassName($className);
        return isset($this->classReflectionData[$className]);
    }

Usage Example

 /**
  * Adds code to build the methods and advices array in case the parent class has some.
  *
  * @param string $className
  * @param ClassNameIndex $treatedSubClasses
  * @return ClassNameIndex
  */
 protected function addBuildMethodsAndAdvicesCodeToClass($className, ClassNameIndex $treatedSubClasses)
 {
     if ($treatedSubClasses->hasClassName($className)) {
         return $treatedSubClasses;
     }
     $treatedSubClasses = $treatedSubClasses->union(new ClassNameIndex([$className]));
     if ($this->reflectionService->isClassReflected($className) === false) {
         return $treatedSubClasses;
     }
     $proxyClass = $this->compiler->getProxyClass($className);
     if ($proxyClass === false) {
         return $treatedSubClasses;
     }
     $callBuildMethodsAndAdvicesArrayCode = "        if (method_exists(get_parent_class(), 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable('parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray')) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n";
     $proxyClass->getConstructor()->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
     $proxyClass->getMethod('__wakeup')->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
     return $treatedSubClasses;
 }
ReflectionService