[GENERIC] Zend_Translate:
[zend.git] / documentation / manual / en / module_specs / Zend_Application-CoreFunctionality-Bootstrap_ResourceBootstrapper.xml
blob4bd20a3682364e27ae530c27e10f676de08fd644
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect2 id="zend.application.core-functionality.bootstrap-resourcebootstrapper">
4     <title>Zend_Application_Bootstrap_ResourceBootstrapper</title>
6     <para>
7         <classname>Zend_Application_Bootstrap_ResourceBootstrapper</classname> is an
8         interface to use when a bootstrap class will be loading external
9         resources -- i.e., one or more resources will not be defined directly in
10         the class, but rather via plugins. It should be used in conjunction with <link
11             linkend="zend.application.core-functionality.bootstrap-bootstrapper">Zend_Application_Bootstrap_Bootstrapper</link>;
12         <link
13             linkend="zend.application.core-functionality.bootstrap-bootstrapabstract">Zend_Application_Bootstrap_BootstrapAbstract</link>
14         implements this functionality.
15     </para>
17     <para>
18         The following methods make up the definition of the interface.
19     </para>
21     <table id="zend.application.core-functionality.bootstrap-resourcebootstrapper.methods-table">
22         <title>Zend_Application_Bootstrap_ResourceBootstrapper Interface</title>
24         <tgroup cols="4">
25             <thead>
26                 <row>
27                     <entry>Method</entry>
28                     <entry>Return Value</entry>
29                     <entry>Parameters</entry>
30                     <entry>Description</entry>
31                 </row>
32             </thead>
34             <tbody>
35                 <row>
36                     <entry>
37                         <methodname>registerPluginResource($resource, $options = null)</methodname>
38                     </entry>
40                     <entry>
41                         <classname>Zend_Application_Bootstrap_ResourceBootstrapper</classname>
42                     </entry>
44                     <entry>
45                         <itemizedlist>
46                             <listitem>
47                                 <para>
48                                     <varname>$resource</varname>: <emphasis>required</emphasis>.
49                                     A resource name or
50                                     <classname>Zend_Application_Resource_Resource</classname>
51                                     object.
52                                 </para>
53                             </listitem>
55                             <listitem>
56                                 <para>
57                                     <varname>$options</varname>: <emphasis>optional</emphasis>.
58                                     An array or <classname>Zend_Config</classname> object to pass
59                                     to the resource on instantiation.
60                                 </para>
61                             </listitem>
62                         </itemizedlist>
63                     </entry>
65                     <entry>
66                         <para>
67                             Register a resource with the class, providing optional
68                             configuration to pass to the resource.
69                         </para>
70                     </entry>
71                 </row>
73                 <row>
74                     <entry><methodname>unregisterPluginResource($resource)</methodname></entry>
76                     <entry>
77                         <classname>Zend_Application_Bootstrap_ResourceBootstrapper</classname>
78                     </entry>
80                     <entry>
81                         <itemizedlist>
82                             <listitem>
83                                 <para>
84                                     <varname>$resource</varname>: <emphasis>required</emphasis>.
85                                     Name of a resource to unregister from the class.
86                                 </para>
87                             </listitem>
88                         </itemizedlist>
89                     </entry>
91                     <entry><para>Remove a plugin resource from the class.</para></entry>
92                 </row>
94                 <row>
95                     <entry><methodname>hasPluginResource($resource)</methodname></entry>
96                     <entry><type>Boolean</type></entry>
98                     <entry>
99                         <itemizedlist>
100                             <listitem>
101                                 <para>
102                                     <varname>$resource</varname>: <emphasis>required</emphasis>.
103                                     Name of the resource.
104                                 </para>
105                             </listitem>
106                         </itemizedlist>
107                     </entry>
109                     <entry>
110                         <para>
111                             Determine if a specific resource has been registered with the class.
112                         </para>
113                     </entry>
114                 </row>
116                 <row>
117                     <entry><methodname>getPluginResource($resource)</methodname></entry>
118                     <entry><classname>Zend_Application_Resource_Resource</classname></entry>
120                     <entry>
121                         <itemizedlist>
122                             <listitem>
123                                 <para>
124                                     <varname>$resource</varname>: <emphasis>required</emphasis>.
125                                     Name of a resource to retrieve (string).
126                                 </para>
127                             </listitem>
128                         </itemizedlist>
129                     </entry>
131                     <entry><para>Retrieve a plugin resource instance by name.</para></entry>
132                 </row>
134                 <row>
135                     <entry><methodname>getPluginResourceNames()</methodname></entry>
136                     <entry><type>Array</type></entry>
137                     <entry>N/A</entry>
138                     <entry>
139                         <para>Retrieve a list of all registered plugin resource names.</para>
140                     </entry>
141                 </row>
143                 <row>
144                     <entry>
145                         <methodname>setPluginLoader(Zend_Loader_PluginLoader_Interface
146                             $loader)</methodname>
147                     </entry>
149                     <entry>
150                         <classname>Zend_Application_Bootstrap_ResourceBootstrapper</classname>
151                     </entry>
153                     <entry>
154                         <itemizedlist>
155                             <listitem>
156                                 <para>
157                                     <varname>$loader</varname>: <emphasis>required</emphasis>.
158                                     Plugin loader instance to use when resolving plugin
159                                     names to classes.
160                                 </para>
161                             </listitem>
162                         </itemizedlist>
163                     </entry>
165                     <entry>
166                         <para>
167                             Register a plugin loader instance to use when resolving plugin class
168                             names.
169                         </para>
170                     </entry>
171                 </row>
173                 <row>
174                     <entry><methodname>getPluginLoader()</methodname></entry>
175                     <entry><classname>Zend_Loader_PluginLoader_Interface</classname></entry>
176                     <entry>N/A</entry>
177                     <entry><para>Retrieve the registered plugin loader.</para></entry>
178                 </row>
179             </tbody>
180         </tgroup>
181     </table>
182 </sect2>