| 1 | <?php |
||
| 13 | class Configuration |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var array Internal configurations |
||
| 18 | */ |
||
| 19 | protected $configurations = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Configuration constructor. |
||
| 23 | * |
||
| 24 | * @param array $config |
||
| 25 | */ |
||
| 26 | public function __construct(array $config) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Set configuration |
||
| 35 | * |
||
| 36 | * @param string $key Configuration name |
||
| 37 | * @param mixed $value Configuration value |
||
| 38 | */ |
||
| 39 | public function set(string $key, $value) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Get configuration |
||
| 46 | * |
||
| 47 | * @param string $key Configuration name |
||
| 48 | * |
||
| 49 | * @return mixed Configuration value |
||
| 50 | * |
||
| 51 | * @throws ConfigurationNonexistentException If configuration has not been set |
||
| 52 | */ |
||
| 53 | public function get(string $key) |
||
| 61 | } |
||
| 62 |