1 | <?php |
||
10 | class Renderer implements RendererInterface |
||
11 | { |
||
12 | const DEFAULT_EXTENSION = '.phtml'; |
||
13 | |||
14 | protected $path; |
||
15 | protected $helpers; |
||
16 | protected $extension; |
||
17 | protected $current; |
||
18 | protected $parent = []; |
||
19 | protected $content = ''; |
||
20 | protected $capture = []; |
||
21 | protected $blocks = []; |
||
22 | |||
23 | 5 | public function __construct(string $path, HelpersInterface $helpers, string $extension = self::DEFAULT_EXTENSION) |
|
29 | |||
30 | 1 | public function helper($name) |
|
34 | |||
35 | 3 | public function render(string $template, array $parameters = []): string |
|
57 | |||
58 | 1 | public function extend(string $template) |
|
62 | |||
63 | 1 | public function content(): string |
|
67 | |||
68 | 1 | public function block(string $name, string $default = ''): string |
|
72 | |||
73 | 1 | public function start(string $name) |
|
78 | |||
79 | 1 | public function stop() |
|
84 | |||
85 | 2 | protected function include(string $__file__, array $__parameters__ = []): string |
|
92 | } |