... | ... |
@@ -11,6 +11,9 @@ class ViewEngine{ |
11 | 11 |
} |
12 | 12 |
|
13 | 13 |
public function register($fileExtension, $viewEngine){ |
14 |
+ if(!class_exists($viewEngine,true)){ |
|
15 |
+ throw new \Exception("Class \"$viewEngine\" not found!"); |
|
16 |
+ } |
|
14 | 17 |
if(!isset(class_implements($viewEngine, true)['IViewEngine'])){ |
15 | 18 |
throw new \Exception("Class \"$viewEngine\" does not implement IViewEngine interface!"); |
16 | 19 |
} |