This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$map = require __DIR__ . '/autoload_namespaces.php'; | |
// Contents of autoload_namespaces.php ... | |
$vendorDir = dirname(dirname(__FILE__)); | |
$baseDir = dirname($vendorDir); | |
return array( | |
'Zend_' => array($vendorDir . '/magento/zendframework1/library'), | |
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), | |
'Psr\\Log\\' => array($vendorDir . '/psr/log'), | |
'PHPMD\\' => array($vendorDir . '/phpmd/phpmd/src/main/php'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($map as $namespace => $path) { | |
$loader->set($namespace, $path); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$map = require __DIR__ . '/autoload_psr4.php'; | |
// Contents of autoload_psr4.php ... | |
$vendorDir = dirname(dirname(__FILE__)); | |
$baseDir = dirname($vendorDir); | |
return array( | |
'Zend\\View\\' => array($vendorDir . '/zendframework/zend-view'), | |
'Zend\\Validator\\' => array($vendorDir . '/zendframework/zend-validator'), | |
'Zend\\Uri\\' => array($vendorDir . '/zendframework/zend-uri'), | |
'Zend\\Text\\' => array($vendorDir . '/zendframework/zend-text'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($map as $namespace => $path) { | |
$loader->setPsr4($namespace, $path); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$classMap = require __DIR__ . '/autoload_classmap.php' | |
// Partial Contents of autoload_classmap.php ... | |
$vendorDir = dirname(dirname(__FILE__)); | |
$baseDir = dirname($vendorDir); | |
return array( | |
'CSSmin' => $vendorDir . '/tubalmartin/cssmin/cssmin.php', | |
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator.php', | |
'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Facade.php', | |
'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/File/Iterator/Factory.php', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($classMap) { | |
$loader->addClassMap($classMap); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$loader->setUseIncludePath(true); | |
$loader->register(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function register($prepend = false) | |
{ | |
spl_autoload_register(array($this, 'loadClass'), true, $prepend); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []); |