1 | <?php |
||
8 | class Configuration |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | protected $mapping = []; |
||
14 | /** |
||
15 | * @var \Noodlehaus\Config |
||
16 | */ |
||
17 | protected $config; |
||
18 | |||
19 | /** |
||
20 | * @param string|array $file |
||
21 | * @return \PHPSemVerChecker\Configuration\Configuration |
||
22 | */ |
||
23 | public static function fromFile($file) |
||
32 | |||
33 | /** |
||
34 | * @return \PHPSemVerChecker\Configuration\Configuration |
||
35 | */ |
||
36 | public static function defaults() |
||
40 | |||
41 | /** |
||
42 | * @param array $mapping |
||
43 | */ |
||
44 | protected function extractMapping(array $mapping) |
||
51 | |||
52 | /** |
||
53 | * @return array |
||
54 | */ |
||
55 | public function getLevelMapping() |
||
59 | |||
60 | /** |
||
61 | * @see \Noodlehaus\Config::get |
||
62 | * @param string $key |
||
63 | * @param mixed|null $default |
||
64 | * @return array|mixed|null |
||
65 | */ |
||
66 | public function get($key, $default = null) |
||
70 | |||
71 | /** |
||
72 | * @see \Noodlehaus\Config::set |
||
73 | * @param string $key |
||
74 | * @param mixed $value |
||
75 | */ |
||
76 | public function set($key, $value) |
||
80 | |||
81 | /** |
||
82 | * Merge this configuration with an associative array. |
||
83 | * |
||
84 | * Note that dot notation is used for keys. |
||
85 | * |
||
86 | * @param array $data |
||
87 | */ |
||
88 | public function merge($data) |
||
94 | } |
||
95 |