1 | <?php |
||
7 | class LoopResolver extends AbstractResolver implements EnumerableReferenceResolverInterface |
||
8 | { |
||
9 | protected $referencePrefixes = array('loop:'); |
||
10 | |||
11 | protected $stack = array(); |
||
12 | |||
13 | 1 | public function beginLoop() |
|
17 | |||
18 | 1 | public function endLoop() |
|
22 | |||
23 | 1 | public function loopStep($key = null, $value = null) |
|
30 | |||
31 | /** |
||
32 | * @param string $identifier format: 'loop:iteration', 'loop:depth', 'loop:key', 'loop:value' |
||
33 | * @return int |
||
34 | * @throws \Exception When trying to retrieve anything else but index and depth |
||
35 | */ |
||
36 | 1 | public function getReferenceValue($identifier) |
|
54 | |||
55 | /** |
||
56 | * We implement this method (interface) purely for convenience, as it allows this resolver to be added to the |
||
57 | * 'custom-reference-resolver' chain and not break migration suspend/resume |
||
58 | * @return array |
||
59 | */ |
||
60 | 1 | public function listReferences() |
|
64 | } |
||
65 |