1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect2 id="zend.application.core-functionality.resource-resource">
4 <title>Zend_Application_Resource_Resource</title>
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.
14 <table id="zend.application.core-functionality.resource-resource.api">
15 <title>Zend_Application_Resource_Resource Interface</title>
21 <entry>Return Value</entry>
22 <entry>Parameters</entry>
23 <entry>Description</entry>
29 <entry><methodname>__construct($options = null)</methodname></entry>
30 <entry><type>Void</type></entry>
36 <varname>$options</varname>: <emphasis>optional</emphasis>.
37 Options with which to set resource state.
45 The constructor should allow passing options with which to initialize
53 <methodname>setBootstrap(Zend_Application_Bootstrap_Bootstrapper
54 $bootstrap)</methodname>
57 <entry><classname>Zend_Application_Resource_Resource</classname></entry>
63 <varname>$bootstrap</varname>: <emphasis>required</emphasis>.
64 Parent bootstrap initializing this resource.
71 <para>Should allow registering the parent bootstrap object.</para>
76 <entry><methodname>getBootstrap()</methodname></entry>
77 <entry><classname>Zend_Application_Bootstrap_Bootstrapper</classname></entry>
79 <entry><para>Retrieve the registered bootstrap instance.</para></entry>
83 <entry><methodname>setOptions(array $options)</methodname></entry>
84 <entry><classname>Zend_Application_Resource_Resource</classname></entry>
90 <varname>$options</varname>: <emphasis>required</emphasis>.
91 Options with which to set state.
97 <entry><para>Set resource state.</para></entry>
101 <entry><methodname>getOptions()</methodname></entry>
102 <entry><type>Array</type></entry>
104 <entry><para>Retrieve registered options.</para></entry>
108 <entry><methodname>init()</methodname></entry>
109 <entry><type>Mixed</type></entry>
113 <para>Strategy pattern: run initialization of the resource.</para>