Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
30 | public function render(string $file, array $data = [], bool $return = false): string |
||
31 | { |
||
32 | header('Content-Type: text/html; charset=utf-8'); |
||
33 | |||
34 | $this->check_viewExist($file); |
||
35 | |||
36 | $buffer = $this->getOB($this->path . DIRECTORY_SEPARATOR . $file . '.view.php', $data); |
||
37 | |||
38 | $buffer = $this->getVars($buffer); |
||
39 | |||
40 | $buffer = $this->removeComments($buffer); |
||
41 | |||
42 | $this->saveData(); |
||
43 | |||
44 | if(!$return){ |
||
45 | echo $buffer; |
||
46 | return ''; |
||
47 | } |
||
48 | |||
49 | return $buffer; |
||
50 | } |
||
60 |