public function AnnotationDriver::isTransient

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 drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php
Gets the names of all mapped classes known to this driver.

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php, line 149

Class

AnnotationDriver
The AnnotationDriver reads the mapping metadata from docblock annotations.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

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;
}