| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function __destruct() |
||
| 38 | { |
||
| 39 | $vars = ['self' => $this]; |
||
| 40 | $viewPaths = [ |
||
| 41 | BASE_PATH . '/Templates', |
||
| 42 | BASE_PATH . '/Templates/theme/' . $this->theme, |
||
| 43 | ]; |
||
| 44 | $cachePaths = realpath(BASE_PATH . '/../tmp') . '/blade'; |
||
| 45 | if (!is_dir($cachePaths) && !mkdir($cachePaths) && !is_dir($cachePaths)) { |
||
| 46 | die('Could not create cache directory for templates.'); |
||
|
|
|||
| 47 | } |
||
| 48 | $blade = new Blade($viewPaths, $cachePaths); |
||
| 49 | echo $blade->render($this->template, $vars); |
||
| 52 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.