예제 #1
0
파일: Entity.php 프로젝트: daveoncode/pongo
 /**
  * Return a new instance of the current entity.
  * @return Entity
  */
 protected static function createFromDescription(EntityDescription $description)
 {
     $c = $description->getFullyQualifiedClassName();
     return new $c();
 }
예제 #2
0
 /**
  * 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;
 }