| 1 | <?php | ||
| 5 | class Config | ||
| 6 | { | ||
| 7 | private $config; | ||
| 8 | |||
| 9 | 72 | public function __construct(array $config = []) | |
| 13 | |||
| 14 | /** | ||
| 15 | * Build a config array. Merge user defined config with our default config. | ||
| 16 | * | ||
| 17 | * @param array $config User defined config | ||
| 18 | * | ||
| 19 | * @return array New configuration array | ||
| 20 | */ | ||
| 21 | 72 | private function buildConfig(array $config = []) | |
| 33 | |||
| 34 | /** | ||
| 35 | * Get the config variable. | ||
| 36 | * | ||
| 37 | * @param string $val Variable name | ||
| 38 | * | ||
| 39 | * @return array|string Variable value | ||
| 40 | */ | ||
| 41 | 72 | public function get($val) | |
| 52 | |||
| 53 | /** | ||
| 54 | * Return all configurations | ||
| 55 | * | ||
| 56 | * @return array | ||
| 57 | */ | ||
| 58 | public function all() | ||
| 62 | } | ||
| 63 |