1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect2 id="zend.application.core-functionality.bootstrap-bootstrap">
4 <title>Zend_Application_Bootstrap_Bootstrap</title>
7 <classname>Zend_Application_Bootstrap_Bootstrap</classname> is a concrete
8 implementation of <link
9 linkend="zend.application.core-functionality.bootstrap-bootstrapabstract">Zend_Application_Bootstrap_BootstrapAbstract</link>.
10 It's primary feature are that it registers the <link
11 linkend="zend.application.available-resources.frontcontroller">Front
12 Controller resource</link>, and that the <methodname>run()</methodname> method
13 first checks that a default module is defined and then dispatches the
18 In most cases, you will want to extend this class for your bootstrapping
19 needs, or simply use this class and provide a list of resource plugins
23 <sect3 id="zend.application.core-functionality.bootstrap-bootstrap.autoloading">
24 <title>Enabling Application Autoloading</title>
27 Additionally, this bootstrap implementation provides the ability to specify the
28 "namespace" or class prefix for resources located in its tree, which will enable
29 autoloading of various application resources; essentially, it instantiates a <link
30 linkend="zend.loader.autoloader-resource.module">Zend_Application_Module_Autoloader</link>
31 object, providing the requested namespace and the bootstrap's directory as arguments.
32 You may enable this functionality by providing a namespace to the "appnamespace"
33 configuration option. As an <acronym>INI</acronym> example:
36 <programlisting language="ini"><![CDATA[
37 appnamespace = "Application"
41 Or in <acronym>XML</acronym>:
44 <programlisting language="xml"><![CDATA[
45 <appnamespace>Application</appnamespace>
49 By default, <classname>Zend_Tool</classname> will enable this option with the value
54 Alternately, you can simply define the <varname>$_appNamespace</varname> property of
55 your bootstrap class with the appropriate value:
58 <programlisting language="php"><![CDATA[
59 class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
61 protected $_appNamespace = 'Application';