| 1 | <?php |
||
| 29 | class Config |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * Array with config settings |
||
| 33 | **/ |
||
| 34 | private $_config = []; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Error details as an array |
||
| 38 | **/ |
||
| 39 | private $_error = []; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Prepare configuration |
||
| 43 | * |
||
| 44 | * @return \csphere\core\init\Config |
||
| 45 | **/ |
||
| 46 | |||
| 47 | public function __construct() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Loads the configuration file |
||
| 55 | * |
||
| 56 | * @return void |
||
| 57 | **/ |
||
| 58 | |||
| 59 | private function _configFile() |
||
| 83 | |||
| 84 | /** |
||
| 85 | * Pass configuration details |
||
| 86 | * |
||
| 87 | * @return array |
||
| 88 | **/ |
||
| 89 | |||
| 90 | public function get() |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Pass error details |
||
| 97 | * |
||
| 98 | * @return array |
||
| 99 | **/ |
||
| 100 | |||
| 101 | public function error() |
||
| 105 | } |
||
| 106 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.