|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Application |
|
17 * @subpackage Resource |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: Resource.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * Interface for bootstrap resources |
|
25 * |
|
26 * @category Zend |
|
27 * @package Zend_Application |
|
28 * @subpackage Resource |
|
29 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
30 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
31 */ |
|
32 interface Zend_Application_Resource_Resource |
|
33 { |
|
34 /** |
|
35 * Constructor |
|
36 * |
|
37 * Must take an optional single argument, $options. |
|
38 * |
|
39 * @param mixed $options |
|
40 * @return void |
|
41 */ |
|
42 public function __construct($options = null); |
|
43 |
|
44 /** |
|
45 * Set the bootstrap to which the resource is attached |
|
46 * |
|
47 * @param Zend_Application_Bootstrap_Bootstrapper $bootstrap |
|
48 * @return Zend_Application_Resource_Resource |
|
49 */ |
|
50 public function setBootstrap(Zend_Application_Bootstrap_Bootstrapper $bootstrap); |
|
51 |
|
52 /** |
|
53 * Retrieve the bootstrap to which the resource is attached |
|
54 * |
|
55 * @return Zend_Application_Bootstrap_Bootstrapper |
|
56 */ |
|
57 public function getBootstrap(); |
|
58 |
|
59 /** |
|
60 * Set resource options |
|
61 * |
|
62 * @param array $options |
|
63 * @return Zend_Application_Resource_Resource |
|
64 */ |
|
65 public function setOptions(array $options); |
|
66 |
|
67 /** |
|
68 * Retrieve resource options |
|
69 * |
|
70 * @return array |
|
71 */ |
|
72 public function getOptions(); |
|
73 |
|
74 /** |
|
75 * Strategy pattern: initialize resource |
|
76 * |
|
77 * @return mixed |
|
78 */ |
|
79 public function init(); |
|
80 } |