| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function render(string $view, array $data = []): string |
||
| 19 | { |
||
| 20 | $content = $this->handle($this->getContent($view, $this->config)); |
||
| 21 | |||
| 22 | $this->data = array_merge($data, $this->data); |
||
| 23 | |||
| 24 | $fname = getcwd() . '/' . $this->config['cache_dir'] . '/' . $view . '.phtml'; |
||
| 25 | |||
| 26 | $file = new File; |
||
| 27 | |||
| 28 | if ($file->create($fname) !== false) { |
||
| 29 | $file->write($content); |
||
| 30 | $content = $file->read($this->data); |
||
| 31 | $file->close(); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $content; |
||
| 35 | } |
||
| 49 |