1 | <?php |
||
20 | class Options |
||
21 | { |
||
22 | /** |
||
23 | * Map of options |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | private $options; |
||
28 | |||
29 | /** |
||
30 | * Options constructor. |
||
31 | * |
||
32 | * @param array $options |
||
33 | */ |
||
34 | 34 | public function __construct(array $options) |
|
38 | |||
39 | /** |
||
40 | * Return a option value. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @param mixed $default |
||
44 | * @return mixed |
||
45 | */ |
||
46 | 12 | public function get(string $name, $default = null) |
|
50 | |||
51 | /** |
||
52 | * Return all options. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | 8 | public function getAll() : array |
|
60 | } |
||
61 |