Add namespace.
This commit is contained in:
17
Load.php
17
Load.php
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php namespace Majestic;
|
||||
/**
|
||||
* @copyright NetMonsters <team@netmonsters.ru>
|
||||
* @link http://netmonsters.ru
|
||||
@ -18,6 +18,15 @@ class Load
|
||||
|
||||
static protected $builder = null;
|
||||
|
||||
/**
|
||||
* @var \Composer\Autoload\ClassLoader
|
||||
*/
|
||||
static protected $class_loader;
|
||||
|
||||
static public function setClassLoader($class_loader) {
|
||||
self::$class_loader = $class_loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add exclude path for autoload. Should be called before setAutoloadFrom
|
||||
* @static
|
||||
@ -62,7 +71,11 @@ class Load
|
||||
|
||||
static public function getFilePath($class)
|
||||
{
|
||||
return self::$autoload[$class];
|
||||
if (self::$class_loader) {
|
||||
return self::$class_loader->findFile($class);
|
||||
} else {
|
||||
return self::$autoload[$class];
|
||||
}
|
||||
}
|
||||
|
||||
static protected function buildAutoload()
|
||||
|
Reference in New Issue
Block a user