Conditions | 9 |
Paths | 16 |
Total Lines | 35 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public static function getLoader() |
||
20 | { |
||
21 | if (null !== self::$loader) { |
||
22 | return self::$loader; |
||
23 | } |
||
24 | |||
25 | spl_autoload_register(array('ComposerAutoloaderInit1e87096dad47e9c00b5af50c9261f577', 'loadClassLoader'), true, true); |
||
26 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); |
||
27 | spl_autoload_unregister(array('ComposerAutoloaderInit1e87096dad47e9c00b5af50c9261f577', 'loadClassLoader')); |
||
28 | |||
29 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
||
30 | if ($useStaticLoader) { |
||
31 | require __DIR__ . '/autoload_static.php'; |
||
32 | |||
33 | call_user_func(\Composer\Autoload\ComposerStaticInit1e87096dad47e9c00b5af50c9261f577::getInitializer($loader)); |
||
34 | } else { |
||
35 | $map = require __DIR__ . '/autoload_namespaces.php'; |
||
36 | foreach ($map as $namespace => $path) { |
||
37 | $loader->set($namespace, $path); |
||
38 | } |
||
39 | |||
40 | $map = require __DIR__ . '/autoload_psr4.php'; |
||
41 | foreach ($map as $namespace => $path) { |
||
42 | $loader->setPsr4($namespace, $path); |
||
43 | } |
||
44 | |||
45 | $classMap = require __DIR__ . '/autoload_classmap.php'; |
||
46 | if ($classMap) { |
||
47 | $loader->addClassMap($classMap); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | $loader->register(true); |
||
52 | |||
53 | return $loader; |
||
54 | } |
||
56 |