1 | <?php |
||
8 | class Configuration |
||
9 | { |
||
10 | /** |
||
11 | * @var int[] |
||
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) |
||
27 | |||
28 | /** |
||
29 | * @return \PHPSemVerChecker\Configuration\Configuration |
||
30 | */ |
||
31 | public static function defaults() |
||
35 | |||
36 | /** |
||
37 | * @param string|array $path |
||
38 | */ |
||
39 | public function __construct($path) |
||
44 | |||
45 | /** |
||
46 | * @return array |
||
47 | */ |
||
48 | public function getLevelMapping() |
||
52 | |||
53 | /** |
||
54 | * @see \Noodlehaus\Config::get |
||
55 | * @param string $key |
||
56 | * @param mixed|null $default |
||
57 | * @return array|mixed|null |
||
58 | */ |
||
59 | public function get($key, $default = null) |
||
63 | |||
64 | /** |
||
65 | * @see \Noodlehaus\Config::set |
||
66 | * @param string $key |
||
67 | * @param mixed $value |
||
68 | */ |
||
69 | public function set($key, $value) |
||
73 | |||
74 | /** |
||
75 | * Merge this configuration with an associative array. |
||
76 | * |
||
77 | * Note that dot notation is used for keys. |
||
78 | * |
||
79 | * @param array $data |
||
80 | */ |
||
81 | public function merge($data) |
||
87 | |||
88 | /** |
||
89 | * @param array $mapping |
||
90 | */ |
||
91 | protected function extractMapping(array $mapping) |
||
98 | } |
||
99 |