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