Total Complexity | 5 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php |
||
7 | class Core extends Smarty |
||
8 | { |
||
9 | private $temp = '.'; |
||
10 | |||
11 | 1 | public function __construct(string $tempDirectory) |
|
12 | { |
||
13 | 1 | parent::__construct(); |
|
14 | 1 | $this->temp = $tempDirectory; |
|
15 | 1 | $this->setCompileDir("{$this->temp}/smarty_compiled_templates"); |
|
16 | 1 | } |
|
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 | 1 | public function setData($data) |
|
29 | 1 | } |
|
30 | } |
||
31 |