Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Bootstrap.php
- <?php
- class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
- {
- protected function _initView()
- {
- // Initialize view
- $view = new Zend_View();
- $view->doctype('XHTML1_STRICT');
- // Add it to the ViewRenderer
- $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
- 'ViewRenderer'
- );
- $viewRenderer->setView($view);
- // Return it, so that it can be stored by the bootstrap
- return $view;
- }
- protected function _initLibraryNamespaces()
- {
- $loader = Zend_Loader_Autoloader::getInstance();
- $loader->registerNamespace('Lupi_')
- ->registerNamespace('Scienta_');
- }
- protected function _initRouting()
- {
- $router = Zend_Controller_Front::getInstance()->getRouter();
- $router->addRoute('dbLookup', new Lupi_Controller_Router_Route_DbRoute());
- $staticRoute = 'Zend_Controller_Router_Route_Static';
- $rewriteRoute = 'Zend_Controller_Router_Route';
- $router->addRoute('user_login',
- new $staticRoute('login',
- array('module' => 'default',
- 'controller' => 'login',
- 'action' => 'login')));
- $router->addRoute('user_logout',
- new $staticRoute('logout',
- array('module' => 'default',
- 'controller' => 'login',
- 'action' => 'logout')));
- $router->addRoute('admin_logout',
- new $staticRoute('admin/logout',
- array('module' => 'admin',
- 'controller' => 'login',
- 'action' => 'logout')));
- $router->addRoute('admin_login',
- new $staticRoute('admin/login',
- array('module' => 'admin',
- 'controller' => 'login',
- 'action' => 'index')));
- $router->addRoute('article_year',
- new $rewriteRoute('blog/:year',
- array('module' => 'default',
- 'controller' => 'article',
- 'action' => 'year'),
- array('year' => '\d+')));
- $router->addRoute('article_month',
- new $rewriteRoute('blog/:year/:month',
- array('module' => 'default',
- 'controller' => 'article',
- 'action' => 'month'),
- array('year' => '\d+',
- 'month' => '\d+')));
- }
- ## app.ini
- [production]
- phpSettings.display_startup_errors = 0
- phpSettings.display_errors = 0
- bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
- bootstrap.class = "Bootstrap"
- resources.frontController.moduleControllerDirectoryName = "controllers"
- resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
- resources.frontController.defaultModule = "default"
- resources.frontController.plugins.modulelayout = "Lupi_Controller_Plugin_ModuleLayout"
- resources.frontController.plugins.scienta = "Scienta_Controller_Plugin_Debug"
- resources.db.params.host = "localhost"
- resources.db.params.dbname = ""
- resources.db.params.username = ""
- resources.db.params.password = ""
- resources.db.adapter = "Pdo_Mysql"
- resources.db.isDefaultTableAdapter = true
- resources.layout.layout = "default"
- resources.layout.layoutPath = APPLICATION_PATH "/modules/default/layouts"
- resources.view.encoding = "UTF-8"
- [staging : production]
- [testing : production]
- phpSettings.display_startup_errors = 1
- phpSettings.display_errors = 1
- [development : production]
- phpSettings.display_startup_errors = 1
- phpSettings.display_errors = 1
- }
Add Comment
Please, Sign In to add comment