Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store


Zend_Application_Bootstrap_Bootstrapper is the base interface all bootstrap classes must implement. The base functionality is aimed at configuration, identifying resources, bootstrapping (either individual resources or the entire application), and dispatching the application.

The following methods make up the definition of the interface.

Table 4. Zend_Application_Bootstrap_Bootstrapper Interface

Method Return Value Parameters Description
__construct($application) Void
  • $application: required. Should accept a Zend_Application or a Zend_Application_Bootstrap_Bootstrapper object as the sole argument.

Constructor. Accepts a single argument, which should be a Zend_Application object, or another bootstrap object.

setOptions(array $options) Zend_Application_Bootstrap_Bootstrapper
  • $options: required. Array of options to set.

Typically, any option that has a matching setter will invoke that setter; otherwise, the option will simply be stored for later retrieval.

getApplication() Zend_Application | Zend_Application_Bootstrap_Bootstrapper N/A

Retrieve the application or bootstrap object passed via the constructor.

getEnvironment() String N/A

Retrieve the environment string registered with the parent application or bootstrap object.

getClassResources() Array N/A

Retrieve a list of available resource initializer names as defined in the class. This may be implementation specific.

bootstrap($resource = null) Mixed
  • $resource: optional.

If $resource is empty, execute all bootstrap resources. If a string, execute that single resource; if an array, execute each resource in the array.

run() Void N/A

Defines what application logic to run after bootstrapping.

Zend Framework