Beispiel #1
0
 /**
  * Initialize 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 void
  */
 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));
             }
         }
     }
 }