PhpRiot
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_Bootstrap

Zend_Application_Bootstrap_Bootstrap is a concrete implementation of Zend_Application_Bootstrap_BootstrapAbstract. It's primary feature are that it registers the Front Controller resource, and that the run() method first checks that a default module is defined and then dispatches the front controller.

In most cases, you will want to extend this class for your bootstrapping needs, or simply use this class and provide a list of resource plugins to utilize.

Enabling Application Autoloading

Additionally, this bootstrap implementation provides the ability to specify the "namespace" or class prefix for resources located in its tree, which will enable autoloading of various application resources; essentially, it instantiates a Zend_Application_Module_Autoloader object, providing the requested namespace and the bootstrap's directory as arguments. You may enable this functionality by providing a namespace to the "appnamespace" configuration option. As an INI example:

appnamespace = "Application"

Or in XML:

<appnamespace>Application</appnamespace>

By default, Zend_Tool will enable this option with the value "Application".

Alternately, you can simply define the $_appNamespace property of your bootstrap class with the appropriate value:

<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected 
$_appNamespace 'Application';
}

Zend Framework