| @@ 35-41 (lines=7) @@ | ||
| 32 | return $this; |
|
| 33 | } |
|
| 34 | ||
| 35 | if (defined("ANAX_APP_PATH")) { |
|
| 36 | $path = ANAX_APP_PATH . "/config/$what"; |
|
| 37 | if (is_readable($path)) { |
|
| 38 | $this->config = require $path; |
|
| 39 | return $this; |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| 43 | if (defined("ANAX_INSTALL_PATH")) { |
|
| 44 | $path = ANAX_INSTALL_PATH . "/config/$what"; |
|
| @@ 43-49 (lines=7) @@ | ||
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| 43 | if (defined("ANAX_INSTALL_PATH")) { |
|
| 44 | $path = ANAX_INSTALL_PATH . "/config/$what"; |
|
| 45 | if (is_readable($path)) { |
|
| 46 | $this->config = require $path; |
|
| 47 | return $this; |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| 51 | throw new ConfigurationException("Configure item '$what' is not an array nor a readable file."); |
|
| 52 | } |
|