add library to the include path, so we can put ZF2's Zend folder directly in library
[zf2.biz/galerie.git] / public / index.php
index f56f4a6..5c4778d 100644 (file)
@@ -5,6 +5,7 @@ defined('APPLICATION_ENV')
 
 // Ensure ZF is on the include path
 set_include_path(implode(PATH_SEPARATOR, array(
+    realpath(__DIR__ . '/../library'),
     realpath(__DIR__ . '/../library/ZendFramework/library'),
     get_include_path(),
 )));
@@ -14,19 +15,16 @@ Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' =>
 
 $appConfig = include __DIR__ . '/../configs/application.config.php';
 
-$moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig->module_paths);
+$moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig['module_paths']);
 $moduleLoader->register();
 
 $moduleManager = new Zend\Module\Manager(
-    $appConfig->modules,
-    new Zend\Module\ManagerOptions($appConfig->module_manager_options)
+    $appConfig['modules'],
+    new Zend\Module\ManagerOptions($appConfig['module_manager_options'])
 );
 
-// Get the merged config object
-$config = $moduleManager->getMergedConfig();
-
 // Create application, bootstrap, and run
-$bootstrap = new $config->bootstrap_class($config, $moduleManager);
-$application = new Zend\Mvc\Application;
+$bootstrap      = new Zend\Mvc\Bootstrap($moduleManager);
+$application    = new Zend\Mvc\Application;
 $bootstrap->bootstrap($application);
 $application->run()->send();