| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public static function load($files = []) |
||
| 30 | { |
||
| 31 | foreach ((array)$files as $file) { |
||
| 32 | if (empty($file) || is_null($file)) { |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | $path = ROUTES . strtolower($file) . '.php'; |
||
| 37 | |||
| 38 | if (!file_exists($path)) { |
||
| 39 | $msg = sprintf('The Route file "%s" could not be found.', $path); |
||
| 40 | |||
| 41 | throw new MissingFileException($msg); |
||
| 42 | } |
||
| 43 | |||
| 44 | include $path; |
||
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 |