[GENERIC] Zend_Translate:
[zend.git] / documentation / manual / en / module_specs / Zend_Application-CoreFunctionality-Resource_Resource.xml
blob2a4298e4481e4b5911c4711b075bb8e970bf7965
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect2 id="zend.application.core-functionality.resource-resource">
4     <title>Zend_Application_Resource_Resource</title>
6     <para>
7         <classname>Zend_Application_Resource_Resource</classname> is an interface for
8         plugin resources used with bootstrap classes implementing
9         <classname>Zend_Application_Bootstrap_ResourceBootstrapper</classname>. Resource
10         plugins are expected to allow configuration, be bootstrap aware, and
11         implement a strategy pattern for initializing the resource.
12     </para>
14     <table id="zend.application.core-functionality.resource-resource.api">
15         <title>Zend_Application_Resource_Resource Interface</title>
17         <tgroup cols="4">
18             <thead>
19                 <row>
20                     <entry>Method</entry>
21                     <entry>Return Value</entry>
22                     <entry>Parameters</entry>
23                     <entry>Description</entry>
24                 </row>
25             </thead>
27             <tbody>
28                 <row>
29                     <entry><methodname>__construct($options = null)</methodname></entry>
30                     <entry><type>Void</type></entry>
32                     <entry>
33                         <itemizedlist>
34                             <listitem>
35                                 <para>
36                                     <varname>$options</varname>: <emphasis>optional</emphasis>.
37                                     Options with which to set resource state.
38                                 </para>
39                             </listitem>
40                         </itemizedlist>
41                     </entry>
43                     <entry>
44                         <para>
45                             The constructor should allow passing options with which to initialize
46                             state.
47                         </para>
48                     </entry>
49                 </row>
51                 <row>
52                     <entry>
53                         <methodname>setBootstrap(Zend_Application_Bootstrap_Bootstrapper
54                             $bootstrap)</methodname>
55                     </entry>
57                     <entry><classname>Zend_Application_Resource_Resource</classname></entry>
59                     <entry>
60                         <itemizedlist>
61                             <listitem>
62                                 <para>
63                                     <varname>$bootstrap</varname>: <emphasis>required</emphasis>.
64                                     Parent bootstrap initializing this resource.
65                                 </para>
66                             </listitem>
67                         </itemizedlist>
68                     </entry>
70                     <entry>
71                         <para>Should allow registering the parent bootstrap object.</para>
72                     </entry>
73                 </row>
75                 <row>
76                     <entry><methodname>getBootstrap()</methodname></entry>
77                     <entry><classname>Zend_Application_Bootstrap_Bootstrapper</classname></entry>
78                     <entry>N/A</entry>
79                     <entry><para>Retrieve the registered bootstrap instance.</para></entry>
80                 </row>
82                 <row>
83                     <entry><methodname>setOptions(array $options)</methodname></entry>
84                     <entry><classname>Zend_Application_Resource_Resource</classname></entry>
86                     <entry>
87                         <itemizedlist>
88                             <listitem>
89                                 <para>
90                                     <varname>$options</varname>: <emphasis>required</emphasis>.
91                                     Options with which to set state.
92                                 </para>
93                             </listitem>
94                         </itemizedlist>
95                     </entry>
97                     <entry><para>Set resource state.</para></entry>
98                 </row>
100                 <row>
101                     <entry><methodname>getOptions()</methodname></entry>
102                     <entry><type>Array</type></entry>
103                     <entry>N/A</entry>
104                     <entry><para>Retrieve registered options.</para></entry>
105                 </row>
107                 <row>
108                     <entry><methodname>init()</methodname></entry>
109                     <entry><type>Mixed</type></entry>
110                     <entry>N/A</entry>
112                     <entry>
113                         <para>Strategy pattern: run initialization of the resource.</para>
114                     </entry>
115                 </row>
116             </tbody>
117         </tgroup>
118     </table>
119 </sect2>