1 | <?php |
||
29 | class InMemoryDiscovery extends AbstractEditableDiscovery |
||
30 | { |
||
31 | /** |
||
32 | * @var BindingType[] |
||
33 | */ |
||
34 | private $types = array(); |
||
35 | |||
36 | /** |
||
37 | * @var Binding[][] |
||
38 | */ |
||
39 | private $bindingsByTypeName = array(); |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 27 | public function addBindingType(BindingType $type) |
|
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | 4 | public function removeBindingType($typeName) |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 2 | public function removeBindingTypes() |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 5 | public function hasBindingType($typeName) |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 21 | public function getBindingType($typeName) |
|
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function hasBindingTypes() |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | 3 | public function getBindingTypes() |
|
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | 16 | public function addBinding(Binding $binding) |
|
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | 10 | public function findBindings($typeName, Expression $expr = null) |
|
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | 15 | public function getBindings() |
|
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | 2 | protected function removeAllBindings() |
|
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | 1 | protected function removeBindingsThatMatch(Expression $expr) |
|
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | 6 | protected function removeBindingsWithTypeName($typeName) |
|
199 | |||
200 | /** |
||
201 | * {@inheritdoc} |
||
202 | */ |
||
203 | 3 | protected function removeBindingsWithTypeNameThatMatch($typeName, Expression $expr) |
|
219 | |||
220 | /** |
||
221 | * {@inheritdoc} |
||
222 | */ |
||
223 | 2 | protected function hasAnyBinding() |
|
227 | |||
228 | /** |
||
229 | * {@inheritdoc} |
||
230 | */ |
||
231 | protected function hasBindingsThatMatch(Expression $expr) |
||
243 | |||
244 | /** |
||
245 | * {@inheritdoc} |
||
246 | */ |
||
247 | 2 | protected function hasBindingsWithTypeName($typeName) |
|
251 | |||
252 | /** |
||
253 | * {@inheritdoc} |
||
254 | */ |
||
255 | 2 | protected function hasBindingsWithTypeNameThatMatch($typeName, Expression $expr) |
|
269 | } |
||
270 |