1 | <?php |
||
13 | class Renderer |
||
14 | { |
||
15 | /** |
||
16 | * Render template until a fixed point is reached. |
||
17 | * |
||
18 | * @param string $tpl Curty template |
||
19 | * @param object|array $ctx Context (variable lookup table) |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | public function __invoke(string $tpl, $ctx) : string |
||
32 | |||
33 | /** |
||
34 | * Render template. |
||
35 | * |
||
36 | * @param string $tpl Curty template |
||
37 | * @param object|array $ctx Context (variable lookup table) |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function render(string $tpl, $ctx) : string |
||
59 | |||
60 | protected function getValue(string $key, $ctx) |
||
70 | |||
71 | protected function renderValue($value) : string |
||
83 | } |
||
84 |