예제 #1
0
파일: Entity.php 프로젝트: bigwhoop/hynage
 /**
  * @return string
  * @throws Entity\InvalidDefinitionException
  */
 public static function getClassNameOfEntityDefinition()
 {
     $class = new \ReflectionClass(get_called_class());
     while ($class instanceof \ReflectionClass) {
         if (false !== strpos($class->getDocComment(), 'HynageEntityType')) {
             return $class->getName();
         }
         $class = $class->getParentClass();
     }
     throw new Entity\InvalidDefinitionException('Could not find class with table/field definition.');
 }