| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __construct($file, $data = []) |
||
| 21 | { |
||
| 22 | Application::app()->view = $this; |
||
| 23 | $controller = Application::app()->controller; |
||
| 24 | $data = array_merge(get_object_vars($controller), $data); |
||
| 25 | parent::__construct($file, $data); |
||
| 26 | |||
| 27 | if (!$this->exists()) { |
||
| 28 | throw new HttpException("View '{$this->file}' not found", 404); |
||
| 29 | } |
||
| 32 |