Exemplo n.º 1
0
 /**
  * Register autoload file.
  */
 protected function registerAutoload()
 {
     require_once Yii::getPathOfAlias("application.{$this->rootPath}.docolight.Docolight.Support.ClassLoader") . '.php';
     if ($librariesPath = realpath(Yii::getPathOfAlias("application.{$this->rootPath}"))) {
         foreach (array_merge($this->getDefaultLibraries(), $this->libraries) as $library) {
             ClassLoader::addDirectories($librariesPath . DIRECTORY_SEPARATOR . $library);
         }
         ClassLoader::register();
     }
 }
Exemplo n.º 2
0
 protected function loadPsr()
 {
     foreach ($this->psrs as $psr) {
         ClassLoader::addDirectories(realpath($this->getBasePath() . DIRECTORY_SEPARATOR . $this->psrPath . DIRECTORY_SEPARATOR . $psr));
     }
 }