You are here

public function MappingDriverChain::isTransient in Plug 7

Returns whether the class with the specified name should have its metadata loaded. This is only the case if it is either mapped as an Entity or a MappedSuperclass.

Parameters

string $className:

Return value

boolean

Overrides MappingDriver::isTransient

File

lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php, line 150

Class

MappingDriverChain
The DriverChain allows you to add multiple other mapping drivers for certain namespaces.

Namespace

Doctrine\Common\Persistence\Mapping\Driver

Code

public function isTransient($className) {

  /* @var $driver MappingDriver */
  foreach ($this->drivers as $namespace => $driver) {
    if (strpos($className, $namespace) === 0) {
      return $driver
        ->isTransient($className);
    }
  }
  if ($this->defaultDriver !== null) {
    return $this->defaultDriver
      ->isTransient($className);
  }
  return true;
}