Neos\Flow\Reflection\ReflectionService::reflectEmergedClasses PHP Method

reflectEmergedClasses() protected method

Checks if the given class names match those which already have been reflected. If the given array contains class names not yet known to this service, these classes will be reflected.
protected reflectEmergedClasses ( ) : void
return void
    protected function reflectEmergedClasses()
    {
        $classNamesToReflect = [];
        foreach ($this->availableClassNames as $classNamesInOnePackage) {
            $classNamesToReflect = array_merge($classNamesToReflect, $classNamesInOnePackage);
        }
        $reflectedClassNames = array_keys($this->classReflectionData);
        sort($classNamesToReflect);
        sort($reflectedClassNames);
        $newClassNames = array_diff($classNamesToReflect, $reflectedClassNames);
        if ($newClassNames === []) {
            return;
        }
        $this->systemLogger->log('Reflected class names did not match class names to reflect', LOG_DEBUG);
        $count = 0;
        $classNameFilterFunction = function ($className) use(&$count) {
            $this->reflectClass($className);
            if (!$this->isClassAnnotatedWith($className, Flow\Entity::class) && !$this->isClassAnnotatedWith($className, ORM\Entity::class) && !$this->isClassAnnotatedWith($className, ORM\Embeddable::class) && !$this->isClassAnnotatedWith($className, Flow\ValueObject::class)) {
                return false;
            }
            $scopeAnnotation = $this->getClassAnnotation($className, Flow\Scope::class);
            if ($scopeAnnotation !== null && $scopeAnnotation->value !== 'prototype') {
                throw new Exception(sprintf('Classes tagged as entity or value object must be of scope prototype, however, %s is declared as %s.', $className, $scopeAnnotation->value), 1264103349);
            }
            $count++;
            return true;
        };
        $classNamesToBuildSchemaFor = array_filter($newClassNames, $classNameFilterFunction);
        $this->buildClassSchemata($classNamesToBuildSchemaFor);
        if ($count > 0) {
            $this->log(sprintf('Reflected %s emerged classes.', $count), LOG_INFO);
        }
    }
ReflectionService