| 1 | <?php |
||
| 19 | class Configuration |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Configuration constructor. |
||
| 23 | * @param array $options |
||
| 24 | */ |
||
| 25 | 48 | public function __construct(array $options = []) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param array $defaults |
||
| 34 | */ |
||
| 35 | 46 | public function applyDefaults(array $defaults) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @var array |
||
| 46 | */ |
||
| 47 | protected $pairs = []; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $key |
||
| 51 | * @param $value |
||
| 52 | */ |
||
| 53 | 48 | public function setPair(string $key, $value) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @param string $key |
||
| 60 | * @return Value |
||
| 61 | */ |
||
| 62 | 6 | public function getPair(string $key): Value |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @param string $key |
||
| 69 | * @return bool |
||
| 70 | */ |
||
| 71 | 46 | public function hasPair($key): bool |
|
| 75 | |||
| 76 | /** |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | 3 | public function getPairs(): array |
|
| 83 | } |
||
| 84 |