@@ -124,6 +124,9 @@ discard block |
||
124 | 124 | return $this->getItem($name); |
125 | 125 | } |
126 | 126 | |
127 | + /** |
|
128 | + * @param string $configurator |
|
129 | + */ |
|
127 | 130 | public function loadString($configurator) |
128 | 131 | { |
129 | 132 | $configurator = preg_replace('/^[\s\t]+/', '', $configurator); |
@@ -175,11 +178,17 @@ discard block |
||
175 | 178 | $this[$name] = $value; |
176 | 179 | } |
177 | 180 | |
181 | + /** |
|
182 | + * @param string $key |
|
183 | + */ |
|
178 | 184 | protected function keyHasStateInstance($key, &$k) |
179 | 185 | { |
180 | 186 | return $this->offsetExists($k = current((explode(' ', $key)))); |
181 | 187 | } |
182 | 188 | |
189 | + /** |
|
190 | + * @param string $key |
|
191 | + */ |
|
183 | 192 | protected function keyHasInstantiator($key) |
184 | 193 | { |
185 | 194 | return false !== stripos($key, ' '); |
@@ -208,6 +217,9 @@ discard block |
||
208 | 217 | return $value; |
209 | 218 | } |
210 | 219 | |
220 | + /** |
|
221 | + * @param string $key |
|
222 | + */ |
|
211 | 223 | protected function parseStandardItem($key, &$value) |
212 | 224 | { |
213 | 225 | if (is_array($value)) { |
@@ -219,11 +231,17 @@ discard block |
||
219 | 231 | $this->offsetSet($key, $value); |
220 | 232 | } |
221 | 233 | |
234 | + /** |
|
235 | + * @return string |
|
236 | + */ |
|
222 | 237 | protected function removeDuplicatedSpaces($string) |
223 | 238 | { |
224 | 239 | return preg_replace('/\s+/', ' ', $string); |
225 | 240 | } |
226 | 241 | |
242 | + /** |
|
243 | + * @param string $key |
|
244 | + */ |
|
227 | 245 | protected function parseInstantiator($key, $value) |
228 | 246 | { |
229 | 247 | $key = $this->removeDuplicatedSpaces($key); |
@@ -256,6 +274,10 @@ discard block |
||
256 | 274 | return $this->parseSingleValue($value); |
257 | 275 | } |
258 | 276 | } |
277 | + |
|
278 | + /** |
|
279 | + * @param string $value |
|
280 | + */ |
|
259 | 281 | protected function hasCompleteBrackets($value) |
260 | 282 | { |
261 | 283 | return false !== strpos($value, '[') && false !== strpos($value, ']'); |
@@ -275,6 +297,9 @@ discard block |
||
275 | 297 | } |
276 | 298 | } |
277 | 299 | |
300 | + /** |
|
301 | + * @param string $value |
|
302 | + */ |
|
278 | 303 | protected function parseConstants($value) |
279 | 304 | { |
280 | 305 | if (preg_match('/^[\\a-zA-Z_]+([:]{2}[A-Z_]+)?$/', $value) && defined($value)) { |
@@ -298,6 +323,9 @@ discard block |
||
298 | 323 | } |
299 | 324 | } |
300 | 325 | |
326 | + /** |
|
327 | + * @param string $value |
|
328 | + */ |
|
301 | 329 | protected function parseBrackets($value) |
302 | 330 | { |
303 | 331 | if ($this->matchSequence($value)) { |