Gdzie można znależć liste wszystkich zasobów (resources), które domyślnie można użyć w application.ini przy Zend_Application.
// Moduł domyśłny // Inne moduły (np. moduł blog-a)
[production] # Debug output phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 # Include path includePaths.library = APPLICATION_PATH "/../library" # Bootstrap bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" [b]# Front Controller resources.frontController.controllerDirectory.default = APPLICATION_PATH "/default/controllers" [color="#808080"]#resources.frontController.controllerDirectory.blog = APPLICATION_PATH "/blog/controllers"[/color] resources.frontController.moduleControllerDirectoryName = "controllers" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.defaultControllerName = "index" resources.frontController.defaultAction = "index" resources.frontController.defaultModule = "default" resources.modules[] =[/b] resources.frontController.env = APPLICATION_ENV # Layout resources.layout.layout = "layout" resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" # Views resources.view.encoding = "UTF-8" resources.view.basePath = APPLICATION_PATH "/views/" [b][u]# Baza danych dla modułu domyślnego[/u] resources.db.adapter = "pdo_mysql" resources.db.params.host = "localhost" resources.db.params.username = "root" resources.db.params.password = "" resources.db.params.dbname = "loader" resources.db.params.charset = "utf8" resources.db.isDefaultTableAdapter = true [u] # Baza danych dla modułu BLOG[/u] blog.resources.db.adapter = "pdo_mysql" blog.resources.db.params.host = "localhost" blog.resources.db.params.username = "root2" blog.resources.db.params.password = "" blog.resources.db.params.dbname = "blog" blog.resources.db.params.charset = "utf8"[/b] # Session resources.session.save_path = APPLICATION_PATH "/../data/session" resources.session.remember_me_seconds = 43200 #864000
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { function _initView() { $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle('My Project'); $view->env = APPLICATION_ENV; // 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; }
# Baza danych dla modułu BLOG[/u] blog.resources.db.adapter = "pdo_mysql" blog.resources.db.params.host = "localhost" blog.resources.db.params.username = "root2" blog.resources.db.params.password = "" blog.resources.db.params.dbname = "blog" blog.resources.db.params.charset = "utf8"