| Total Complexity | 5 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Core extends Smarty |
||
| 8 | { |
||
| 9 | private $temp = '.'; |
||
| 10 | |||
| 11 | public function __construct(string $tempDirectory) |
||
| 12 | { |
||
| 13 | parent::__construct(); |
||
| 14 | $this->temp = $tempDirectory; |
||
| 15 | $this->setCompileDir("{$this->temp}/smarty_compiled_templates"); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function __destruct() |
||
| 19 | { |
||
| 20 | if($this->temp === '.' && file_exists("./smarty_compiled_templates")) { |
||
| 21 | Filesystem::get("./smarty_compiled_templates")->delete(); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | public function setData($data) |
||
| 29 | } |
||
| 30 | } |
||
| 31 |