public function MappingDriverChain::getAllClassNames 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::getAllClassNames()
Gets the names of all mapped classes known to this driver.
Return value
array The names of all mapped classes known to this driver.
Overrides MappingDriver::getAllClassNames
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ MappingDriverChain.php, line 118
Class
- MappingDriverChain
- The DriverChain allows you to add multiple other mapping drivers for certain namespaces.
Namespace
Doctrine\Common\Persistence\Mapping\DriverCode
public function getAllClassNames() {
$classNames = array();
$driverClasses = array();
/* @var $driver MappingDriver */
foreach ($this->drivers as $namespace => $driver) {
$oid = spl_object_hash($driver);
if (!isset($driverClasses[$oid])) {
$driverClasses[$oid] = $driver
->getAllClassNames();
}
foreach ($driverClasses[$oid] as $className) {
if (strpos($className, $namespace) === 0) {
$classNames[$className] = true;
}
}
}
if (null !== $this->defaultDriver) {
foreach ($this->defaultDriver
->getAllClassNames() as $className) {
$classNames[$className] = true;
}
}
return array_keys($classNames);
}