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