protected function buildClassSchema($className)
{
$classSchema = new ClassSchema($className);
$this->addPropertiesToClassSchema($classSchema);
if ($this->isClassAnnotatedWith($className, ORM\Embeddable::class)) {
return $classSchema;
}
if ($this->isClassAnnotatedWith($className, Flow\ValueObject::class)) {
$this->checkValueObjectRequirements($className);
$classSchema->setModelType(ClassSchema::MODELTYPE_VALUEOBJECT);
return $classSchema;
}
if ($this->isClassAnnotatedWith($className, Flow\Entity::class) || $this->isClassAnnotatedWith($className, ORM\Entity::class)) {
$classSchema->setModelType(ClassSchema::MODELTYPE_ENTITY);
$classSchema->setLazyLoadableObject($this->isClassAnnotatedWith($className, Flow\Lazy::class));
}
$possibleRepositoryClassName = str_replace('\\Model\\', '\\Repository\\', $className) . 'Repository';
if ($this->isClassReflected($possibleRepositoryClassName) === true) {
$classSchema->setRepositoryClassName($possibleRepositoryClassName);
}
return $classSchema;
}