1 | <?php |
||
44 | class Resolver extends ConfigDelegator implements ResolverInterface, AutoWiringInterface |
||
45 | { |
||
46 | /** |
||
47 | * The outer master |
||
48 | * |
||
49 | * @var Container |
||
50 | * @access protected |
||
51 | */ |
||
52 | protected $master; |
||
53 | |||
54 | /** |
||
55 | * The object resolver |
||
56 | * |
||
57 | * @var ObjectResolver |
||
58 | * @access protected |
||
59 | */ |
||
60 | protected $object_resolver; |
||
61 | |||
62 | /** |
||
63 | * The parameter resolver |
||
64 | * |
||
65 | * @var ConfigInterface |
||
66 | * @access protected |
||
67 | */ |
||
68 | protected $config_resolver; |
||
69 | |||
70 | /** |
||
71 | * Container related definition starting node at $config |
||
72 | * |
||
73 | * @var string |
||
74 | * @access protected |
||
75 | */ |
||
76 | protected $base_node; |
||
77 | |||
78 | /** |
||
79 | * Autowiring: automatically resolve classname if it is a defined class |
||
80 | * |
||
81 | * @var bool |
||
82 | * @access protected |
||
83 | */ |
||
84 | protected $auto = true; |
||
85 | |||
86 | /** |
||
87 | * @param Container $master the master |
||
88 | * @param ConfigInterface $config used for parameter resolving |
||
89 | * @param string $nodeName |
||
90 | * @access public |
||
91 | */ |
||
92 | public function __construct( |
||
116 | |||
117 | /** |
||
118 | * {@inheritDoc} |
||
119 | */ |
||
120 | public function resolve(&$toResolve) |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | public function setObjectResolver() |
||
141 | |||
142 | /** |
||
143 | * {@inheritDoc} |
||
144 | */ |
||
145 | public function getInSection(/*# string */ $id, /*# string */ $section) |
||
149 | |||
150 | /** |
||
151 | * {@inheritDoc} |
||
152 | */ |
||
153 | public function hasInSection( |
||
159 | |||
160 | /** |
||
161 | * {@inheritDoc} |
||
162 | */ |
||
163 | public function setInSection( |
||
171 | |||
172 | /** |
||
173 | * {@inheritDoc} |
||
174 | */ |
||
175 | public function getService(/*# string */ $id = '') |
||
179 | |||
180 | /** |
||
181 | * {@inheritDoc} |
||
182 | */ |
||
183 | public function hasService(/*# string */ $id = '')/*# : bool */ |
||
191 | |||
192 | /** |
||
193 | * {@inheritDoc} |
||
194 | */ |
||
195 | public function setService( |
||
208 | |||
209 | /** |
||
210 | * {@inheritDoc} |
||
211 | */ |
||
212 | public function getMapping(/*# string */ $id = '') |
||
216 | |||
217 | /** |
||
218 | * {@inheritDoc} |
||
219 | */ |
||
220 | public function hasMapping(/*# string */ $id = '')/*# : bool */ |
||
224 | |||
225 | /** |
||
226 | * {@inheritDoc} |
||
227 | */ |
||
228 | public function setMapping(/*# string */ $from, $to) |
||
232 | |||
233 | /** |
||
234 | * {@inheritDoc} |
||
235 | */ |
||
236 | public function autoWiring(/*# bool */ $on = true) |
||
241 | |||
242 | /** |
||
243 | * Generate new id base on base and section |
||
244 | * |
||
245 | * @param string $id |
||
246 | * @param string $section |
||
247 | * @return string |
||
248 | * @access protected |
||
249 | */ |
||
250 | protected function getSectionId( |
||
257 | |||
258 | /** |
||
259 | * If autowiring is on, and $id is a existing classname, return true |
||
260 | * |
||
261 | * @param string $id |
||
262 | * @return bool |
||
263 | * @access protected |
||
264 | */ |
||
265 | protected function autoClassName(/*# string */ $id)/*# : bool */ |
||
273 | } |
||
274 |