| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function __invoke(string $name = '') |
||
| 26 | { |
||
| 27 | if (!self::$tagOpened) { |
||
| 28 | |||
| 29 | ob_start(function($buffer) { |
||
| 30 | self::$content = $buffer; |
||
| 31 | }); |
||
| 32 | |||
| 33 | } else { |
||
| 34 | |||
| 35 | $content = ob_get_contents(); |
||
| 36 | ob_end_clean(); |
||
| 37 | |||
| 38 | $this->view->getParentTemplate()->setVariable($name, $content); |
||
| 39 | |||
| 40 | self::$tagOpened = false; |
||
| 41 | |||
| 42 | } |
||
| 43 | |||
| 44 | self::$tagOpened = true; |
||
| 45 | } |
||
| 46 | |||
| 52 | } |