Last active
August 29, 2015 14:24
-
-
Save Saeven/cae4902dd656466bcff5 to your computer and use it in GitHub Desktop.
Adjusted Bootstrap for ZF 2.5 that goes straight to zend-loader rather than the old autoloader factory 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
protected static function initAutoloader() | |
{ | |
$vendorPath = static::findParentPath('vendor'); | |
if (file_exists($vendorPath . '/autoload.php')) { | |
include $vendorPath . '/autoload.php'; | |
} | |
include $vendorPath . '/zendframework/zend-loader/src/AutoloaderFactory.php'; | |
AutoloaderFactory::factory(array( | |
'Zend\Loader\StandardAutoloader' => array( | |
'autoregister_zf' => true, | |
'namespaces' => array( | |
__NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__, | |
), | |
), | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment