1
0
mirror of synced 2025-01-18 22:41:43 +03:00

improved _isDoctrineEntity check

This commit is contained in:
romanb 2008-09-12 12:04:25 +00:00
parent 90047298c5
commit b140ea7163

View File

@ -64,13 +64,6 @@ class Doctrine_Query_Parser_AbstractSchemaName extends Doctrine_Query_ParserRule
protected function _isDoctrineEntity($componentName)
{
if (class_exists($componentName)) {
$reflectionClass = new ReflectionClass($componentName);
$dctrnEntityReflectionClass = new ReflectionClass('Doctrine_ORM_Entity');
return $reflectionClass->isSubclassOf($dctrnEntityReflectionClass);
}
return false;
return class_exists($componentName) && is_subclass_of($componentName, 'Doctrine_ORM_Entity');
}
}