Started on the translation module so I can start off with i18n support.
[pivip.git] / project / index.php
blob0ece2e244e1091a5929171dd36943b91de17ae7d
1 <?php
3 set_include_path('library'
4 . PATH_SEPARATOR . 'modules'
5 . PATH_SEPARATOR . 'application/models'
6 . PATH_SEPARATOR . get_include_path()
7 . PATH_SEPARATOR . '.');
9 // Enable the auto-loading of classes that follow the ZF naming convention
10 // http://framework.zend.com/manual/en/coding-standard.naming-conventions.html
11 require 'Zend/Loader.php';
12 Zend_Loader::registerAutoload();
14 // Load the cache configuration and save it to the registry
15 $cacheConfig = new Zend_Config_Ini('./data/config/cache.ini');
16 Zend_Registry::set('cacheConfig', $cacheConfig);
18 // Load the modules and run their bootstrap code
19 $modules = new Pivip_Modules();
21 foreach($modules as $module)
23 $module->bootstrap();
26 $frontController = Zend_Controller_Front::getInstance();
28 // Make sure errors are only thrown when developing
29 if(Pivip_Debug::isTesting())
31 error_reporting(E_ALL|E_STRICT);
32 $frontController->throwExceptions(true);
33 } else {
34 error_reporting(0);
35 $frontController->throwExceptions(false);
38 // With all modules set, start the dispatch loop
39 $frontController->addModuleDirectory('modules');
40 $frontController->dispatch();