/** * Return a new instance of the current entity. * @return Entity */ protected static function createFromDescription(EntityDescription $description) { $c = $description->getFullyQualifiedClassName(); return new $c(); }
/** * Register an Entity that will be managed by EntityManager. * @param EntityDescription $entityDescription Description of the managed entity */ public function registerEntity(EntityDescription $entityDescription) { $c = new ReflectionClass($entityDescription->getFullyQualifiedClassName()); $this->registeredEntities[$c->getShortName()] = $entityDescription; }