| Total Complexity | 9 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class MicroTemplateEngine extends TemplateEngine { |
||
| 9 | private $viewsFolder; |
||
| 10 | private $parsers = [ ]; |
||
| 11 | |||
| 12 | private function getTemplateParser(string $viewName): TemplateParser { |
||
| 13 | if (! isset ( $this->parsers [$viewName] )) { |
||
| 14 | $this->parsers [$viewName] = new TemplateParser ( $this->viewsFolder . $viewName ); |
||
| 15 | } |
||
| 16 | return $this->parsers [$viewName]; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function __construct() { |
||
| 20 | $this->viewsFolder = \ROOT . \DS . 'views' . \DS; |
||
| 21 | } |
||
| 22 | |||
| 23 | /* |
||
| 24 | * (non-PHPdoc) |
||
| 25 | * @see TemplateEngine::render() |
||
| 26 | */ |
||
| 27 | public function render($viewName, $pData, $asString) { |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getBlockNames($templateName) { |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getCode($templateName) { |
||
| 45 | } |
||
| 46 | |||
| 47 | public function exists($name) { |
||
| 50 | } |
||
| 51 | } |
||
| 52 |