public function AnnotationDriver::isTransient in Plug 7
Returns whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded.
A class is non-transient if it is annotated with an annotation from the {
Parameters
string $className:
Return value
boolean
Overrides MappingDriver::isTransient
See also
AnnotationDriver::entityAnnotationClasses}.
1 call to AnnotationDriver::isTransient()
- AnnotationDriver::getAllClassNames in lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ AnnotationDriver.php - Gets the names of all mapped classes known to this driver.
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ AnnotationDriver.php, line 178
Class
- AnnotationDriver
- The AnnotationDriver reads the mapping metadata from docblock annotations.
Namespace
Doctrine\Common\Persistence\Mapping\DriverCode
public function isTransient($className) {
$classAnnotations = $this->reader
->getClassAnnotations(new \ReflectionClass($className));
foreach ($classAnnotations as $annot) {
if (isset($this->entityAnnotationClasses[get_class($annot)])) {
return false;
}
}
return true;
}