Total Complexity | 6 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class Tpl |
||
8 | { |
||
9 | private static $assign = []; |
||
10 | private static $engine = null; |
||
11 | |||
12 | private static function engine(): Engine |
||
13 | { |
||
14 | if (!isset(self::$engine) || is_null(self::$engine)) { |
||
15 | self::$engine = new Engine; |
||
16 | } |
||
17 | |||
18 | return self::$engine; |
||
19 | } |
||
20 | |||
21 | public static function config(array $config): void |
||
22 | { |
||
23 | self::engine()->config($config); |
||
24 | } |
||
25 | |||
26 | public static function assign(string $key, $value): void |
||
29 | } |
||
30 | |||
31 | public static function render(string $template): string |
||
34 | } |
||
35 | } |
||
36 |