/** * Builds class schemata from classes annotated as entities or value objects * * @param array $classNames * @return void */ protected function buildClassSchemata(array $classNames) { foreach ($classNames as $className) { $classSchema = new ClassSchema($className); if ($this->isClassAnnotatedWith($className, 'TYPO3\\Flow\\Annotations\\Entity') || $this->isClassAnnotatedWith($className, 'Doctrine\\ORM\\Mapping\\Entity')) { $classSchema->setModelType(ClassSchema::MODELTYPE_ENTITY); $classSchema->setLazyLoadableObject($this->isClassAnnotatedWith($className, 'TYPO3\\Flow\\Annotations\\Lazy')); $possibleRepositoryClassName = str_replace('\\Model\\', '\\Repository\\', $className) . 'Repository'; if ($this->isClassReflected($possibleRepositoryClassName) === TRUE) { $classSchema->setRepositoryClassName($possibleRepositoryClassName); } } elseif ($this->isClassAnnotatedWith($className, 'TYPO3\\Flow\\Annotations\\ValueObject')) { $this->checkValueObjectRequirements($className); $classSchema->setModelType(ClassSchema::MODELTYPE_VALUEOBJECT); } $this->addPropertiesToClassSchema($classSchema); $this->classSchemata[$className] = $classSchema; } $this->completeRepositoryAssignments(); $this->ensureAggregateRootInheritanceChainConsistency(); }