f7729cdc40
This introduces the defacto standard PSR-4 autoloader from composer into core. This will allow proper PSR-4 naming of our classes. Since our original autoloader is still available we can slowly switch over classes to PSR-4.
45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
// autoload_real.php @generated by Composer
|
|
|
|
class ComposerAutoloaderInit53792487c5a8370acc0b06b1a864ff4c
|
|
{
|
|
private static $loader;
|
|
|
|
public static function loadClassLoader($class)
|
|
{
|
|
if ('Composer\Autoload\ClassLoader' === $class) {
|
|
require __DIR__ . '/ClassLoader.php';
|
|
}
|
|
}
|
|
|
|
public static function getLoader()
|
|
{
|
|
if (null !== self::$loader) {
|
|
return self::$loader;
|
|
}
|
|
|
|
spl_autoload_register(array('ComposerAutoloaderInit53792487c5a8370acc0b06b1a864ff4c', 'loadClassLoader'), true, true);
|
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
|
spl_autoload_unregister(array('ComposerAutoloaderInit53792487c5a8370acc0b06b1a864ff4c', 'loadClassLoader'));
|
|
|
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
|
foreach ($map as $namespace => $path) {
|
|
$loader->set($namespace, $path);
|
|
}
|
|
|
|
$map = require __DIR__ . '/autoload_psr4.php';
|
|
foreach ($map as $namespace => $path) {
|
|
$loader->setPsr4($namespace, $path);
|
|
}
|
|
|
|
$classMap = require __DIR__ . '/autoload_classmap.php';
|
|
if ($classMap) {
|
|
$loader->addClassMap($classMap);
|
|
}
|
|
|
|
$loader->register(true);
|
|
|
|
return $loader;
|
|
}
|
|
}
|