public function MappingDriverChain::loadMetadataForClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::loadMetadataForClass()
Loads the metadata for the specified class into the provided container.
Parameters
string $className:
ClassMetadata $metadata:
Return value
void
Overrides MappingDriver::loadMetadataForClass
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ MappingDriverChain.php, line 97
Class
- MappingDriverChain
- The DriverChain allows you to add multiple other mapping drivers for certain namespaces.
Namespace
Doctrine\Common\Persistence\Mapping\DriverCode
public function loadMetadataForClass($className, ClassMetadata $metadata) {
/* @var $driver MappingDriver */
foreach ($this->drivers as $namespace => $driver) {
if (strpos($className, $namespace) === 0) {
$driver
->loadMetadataForClass($className, $metadata);
return;
}
}
if (null !== $this->defaultDriver) {
$this->defaultDriver
->loadMetadataForClass($className, $metadata);
return;
}
throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers));
}