Using Zend_Application for bootstrapping
Zend_Application is a class that provides an easy to use bootstrapping facility for your application. It also takes care of setting up the PHP environment and introduces autoloading by default.
Zend_Application requires a config file to work, so the first thing we need to do is create it. We will create the configuration file application/configs/application.ini with this content:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[production]
; Error reporting
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
; Paths
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
[development : production]
; Error reporting
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1