| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function loadFile($filename, $expose = []) |
||
| 24 | { |
||
| 25 | $anaxInstallPath = ANAX_INSTALL_PATH . "/config/$filename"; |
||
| 26 | $anaxAppPath = ANAX_APP_PATH . "/config/$filename"; |
||
| 27 | extract($expose); |
||
| 28 | |||
| 29 | if (is_readable($anaxAppPath)) { |
||
| 30 | return require $anaxAppPath; |
||
| 31 | } elseif (is_readable($anaxInstallPath)) { |
||
| 32 | return require $anaxInstallPath; |
||
| 33 | } |
||
| 34 | |||
| 35 | throw new Exception("Configure item '$filename' is not a readable file."); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |