1 | <?php |
||
11 | class Db implements Storage\StorageInterface, ServiceManagerAwareInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var StorageInterface |
||
15 | */ |
||
16 | protected $storage; |
||
17 | |||
18 | /** |
||
19 | * @var UserMapper |
||
20 | */ |
||
21 | protected $mapper; |
||
22 | |||
23 | /** |
||
24 | * @var mixed |
||
25 | */ |
||
26 | protected $resolvedIdentity; |
||
27 | |||
28 | /** |
||
29 | * @var ServiceManager |
||
30 | */ |
||
31 | protected $serviceManager; |
||
32 | |||
33 | /** |
||
34 | * Returns true if and only if storage is empty |
||
35 | * |
||
36 | * @throws \Zend\Authentication\Exception\InvalidArgumentException If it is impossible to determine whether |
||
37 | * storage is empty or not |
||
38 | * @return boolean |
||
39 | */ |
||
40 | public function isEmpty() |
||
53 | |||
54 | /** |
||
55 | * Returns the contents of storage |
||
56 | * |
||
57 | * Behavior is undefined when storage is empty. |
||
58 | * |
||
59 | * @throws \Zend\Authentication\Exception\InvalidArgumentException If reading contents from storage is impossible |
||
60 | * @return mixed |
||
61 | */ |
||
62 | public function read() |
||
82 | |||
83 | /** |
||
84 | * Writes $contents to storage |
||
85 | * |
||
86 | * @param mixed $contents |
||
87 | * @throws \Zend\Authentication\Exception\InvalidArgumentException If writing $contents to storage is impossible |
||
88 | * @return void |
||
89 | */ |
||
90 | public function write($contents) |
||
95 | |||
96 | /** |
||
97 | * Clears contents from storage |
||
98 | * |
||
99 | * @throws \Zend\Authentication\Exception\InvalidArgumentException If clearing contents from storage is impossible |
||
100 | * @return void |
||
101 | */ |
||
102 | public function clear() |
||
107 | |||
108 | /** |
||
109 | * getStorage |
||
110 | * |
||
111 | * @return Storage\StorageInterface |
||
112 | */ |
||
113 | public function getStorage() |
||
120 | |||
121 | /** |
||
122 | * setStorage |
||
123 | * |
||
124 | * @param Storage\StorageInterface $storage |
||
125 | * @access public |
||
126 | * @return Db |
||
127 | */ |
||
128 | public function setStorage(Storage\StorageInterface $storage) |
||
133 | |||
134 | /** |
||
135 | * getMapper |
||
136 | * |
||
137 | * @return UserMapper |
||
138 | */ |
||
139 | public function getMapper() |
||
146 | |||
147 | /** |
||
148 | * setMapper |
||
149 | * |
||
150 | * @param UserMapper $mapper |
||
151 | * @return Db |
||
152 | */ |
||
153 | public function setMapper(UserMapper $mapper) |
||
158 | |||
159 | /** |
||
160 | * Retrieve service manager instance |
||
161 | * |
||
162 | * @return ServiceManager |
||
163 | */ |
||
164 | public function getServiceManager() |
||
168 | |||
169 | /** |
||
170 | * Set service manager instance |
||
171 | * |
||
172 | * @param ServiceManager $locator |
||
173 | * @return void |
||
174 | */ |
||
175 | public function setServiceManager(ServiceManager $serviceManager) |
||
179 | } |
||
180 |