protected function FileDriver::initialize in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php \Doctrine\Common\Persistence\Mapping\Driver\FileDriver::initialize()
Initializes the class cache from all the global files.
Using this feature adds a substantial performance hit to file drivers as more metadata has to be loaded into memory than might actually be necessary. This may not be relevant to scenarios where caching of metadata is in place, however hits very hard in scenarios where no caching is used.
Return value
void
3 calls to FileDriver::initialize()
- FileDriver::getAllClassNames in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ FileDriver.php - Gets the names of all mapped classes known to this driver.
- FileDriver::getElement in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ FileDriver.php - Gets the element of schema meta data for the class from the mapping file. This will lazily load the mapping file if it is not loaded yet.
- FileDriver::isTransient in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ FileDriver.php - 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.
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ Mapping/ Driver/ FileDriver.php, line 176
Class
- FileDriver
- Base driver for file-based metadata drivers.
Namespace
Doctrine\Common\Persistence\Mapping\DriverCode
protected function initialize() {
$this->classCache = array();
if (null !== $this->globalBasename) {
foreach ($this->locator
->getPaths() as $path) {
$file = $path . '/' . $this->globalBasename . $this->locator
->getFileExtension();
if (is_file($file)) {
$this->classCache = array_merge($this->classCache, $this
->loadMappingFile($file));
}
}
}
}