1: <?php
2:
3: namespace Deimos\Flow\Extension\TForeach;
4:
5: use Deimos\Flow\FlowFunction;
6:
7: class TEndForeach extends FlowFunction
8: {
9:
10: public function view()
11: {
12: if (!empty(TElseForeach::$elseForeach[TForeach::$level]))
13: {
14: TElseForeach::$elseForeach[TForeach::$level] = null;
15: TForeach::$level--;
16:
17: return '<?php endif; ?>';
18: }
19:
20: $init = '';
21:
22: if (!empty(TForeach::$name[TForeach::$level]))
23: {
24:
25:
26: TForeach::$name[TForeach::$level] = null;
27: }
28:
29: TForeach::$level--;
30:
31: return '<?php endforeach; ' . $init . ' endif; ?>';
32: }
33:
34: }