Autoload classmap

This commit is contained in:
Michael RICOIS 2015-01-22 16:58:43 +00:00
parent ef3c5889a7
commit 2931e94d70

View File

@ -14,8 +14,26 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
// --- Zend_Application
require_once 'Zend/Application.php';
// --- Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
),
'fallback_autoloader' => true
)
));
// --- Create application, bootstrap, and run
$application = new Zend_Application(