[MANUAL] English:
[zend.git] / documentation / manual / en / module_specs / Zend_Application-CoreFunctionality-Bootstrap_Bootstrapper.xml
blob2405aa2e4e7792dced97d775ee332014224090b5
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect2 id="zend.application.core-functionality.bootstrap-bootstrapper">
4     <title>Zend_Application_Bootstrap_Bootstrapper</title>
6     <para>
7         <classname>Zend_Application_Bootstrap_Bootstrapper</classname> is the base interface
8         all bootstrap classes must implement. The base functionality is aimed at
9         configuration, identifying resources, bootstrapping (either individual
10         resources or the entire application), and dispatching the application.
11     </para>
13     <para>
14         The following methods make up the definition of the interface.
15     </para>
17     <table id="zend.application.core-functionality.bootstrap-bootstrapper.methods-table">
18         <title>Zend_Application_Bootstrap_Bootstrapper Interface</title>
20         <tgroup cols="4">
21             <thead>
22                 <row>
23                     <entry>Method</entry>
24                     <entry>Return Value</entry>
25                     <entry>Parameters</entry>
26                     <entry>Description</entry>
27                 </row>
28             </thead>
30             <tbody>
31                 <row>
32                     <entry><methodname>__construct($application)</methodname></entry>
33                     <entry><type>Void</type></entry>
34                     <entry>
35                         <itemizedlist>
36                             <listitem>
37                                 <para>
38                                     <varname>$application</varname>: <emphasis>required</emphasis>.
39                                     Should accept a <classname>Zend_Application</classname> or a
40                                     <classname>Zend_Application_Bootstrap_Bootstrapper</classname>
41                                     object as the sole argument.
42                                 </para>
43                             </listitem>
44                         </itemizedlist>
45                     </entry>
47                     <entry>
48                         <para>
49                             Constructor. Accepts a single argument, which should be a
50                             <classname>Zend_Application</classname> object, or another bootstrap
51                             object.
52                         </para>
53                     </entry>
54                 </row>
56                 <row>
57                     <entry><methodname>setOptions(array $options)</methodname></entry>
58                     <entry><classname>Zend_Application_Bootstrap_Bootstrapper</classname></entry>
60                     <entry>
61                         <itemizedlist>
62                             <listitem>
63                                 <para>
64                                     <varname>$options</varname>: <emphasis>required</emphasis>.
65                                     Array of options to set.
66                                 </para>
67                             </listitem>
68                         </itemizedlist>
69                     </entry>
71                     <entry>
72                         <para>
73                             Typically, any option that has a matching setter will
74                             invoke that setter; otherwise, the option will simply be
75                             stored for later retrieval.
76                         </para>
77                     </entry>
78                 </row>
80                 <row>
81                     <entry><methodname>getApplication()</methodname></entry>
83                     <entry>
84                         <classname>Zend_Application</classname> |
85                         <classname>Zend_Application_Bootstrap_Bootstrapper</classname>
86                     </entry>
88                     <entry>N/A</entry>
90                     <entry>
91                         <para>
92                             Retrieve the application or bootstrap object passed via the
93                             constructor.
94                         </para>
95                     </entry>
96                 </row>
98                 <row>
99                     <entry><methodname>getEnvironment()</methodname></entry>
100                     <entry><type>String</type></entry>
101                     <entry>N/A</entry>
103                     <entry>
104                         <para>
105                             Retrieve the environment string registered with the
106                             parent application or bootstrap object.
107                         </para>
108                     </entry>
109                 </row>
111                 <row>
112                     <entry><methodname>getClassResources()</methodname></entry>
113                     <entry><type>Array</type></entry>
114                     <entry>N/A</entry>
116                     <entry>
117                         <para>
118                             Retrieve a list of available resource initializer names
119                             as defined in the class. This may be implementation specific.
120                         </para>
121                     </entry>
122                 </row>
124                 <row>
125                     <entry><methodname>bootstrap($resource = null)</methodname></entry>
126                     <entry><type>Mixed</type></entry>
127                     <entry>
128                         <itemizedlist>
129                             <listitem>
130                                 <para>
131                                     <varname>$resource</varname>: <emphasis>optional</emphasis>.
132                                 </para>
133                             </listitem>
134                         </itemizedlist>
135                     </entry>
137                     <entry>
138                         <para>
139                             If <varname>$resource</varname> is empty, execute all
140                             bootstrap resources. If a string, execute that single
141                             resource; if an array, execute each resource in the array.
142                         </para>
143                     </entry>
144                 </row>
146                 <row>
147                     <entry><methodname>run()</methodname></entry>
148                     <entry><type>Void</type></entry>
149                     <entry>N/A</entry>
151                     <entry>
152                         <para>Defines what application logic to run after bootstrapping.</para>
153                     </entry>
154                 </row>
155             </tbody>
156         </tgroup>
157     </table>
158 </sect2>