| @@ 31-41 (lines=11) @@ | ||
| 28 | $this->values[$name] = $value; |
|
| 29 | } |
|
| 30 | ||
| 31 | public function has(string $name): bool |
|
| 32 | { |
|
| 33 | $ok = array_key_exists($name, $this->values); |
|
| 34 | if ($ok) { |
|
| 35 | return true; |
|
| 36 | } |
|
| 37 | if ($this->parent) { |
|
| 38 | return $this->parent->has($name); |
|
| 39 | } |
|
| 40 | return false; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function add(string $name, array $array) |
|
| 44 | { |
|
| @@ 84-93 (lines=10) @@ | ||
| 81 | throw new ConfigurationException("Config option \"$name\" does not exist."); |
|
| 82 | } |
|
| 83 | ||
| 84 | protected function fetch($name) |
|
| 85 | { |
|
| 86 | if (array_key_exists($name, $this->values)) { |
|
| 87 | return $this->values[$name]; |
|
| 88 | } |
|
| 89 | if ($this->parent) { |
|
| 90 | return $this->parent->fetch($name); |
|
| 91 | } |
|
| 92 | return null; |
|
| 93 | } |
|
| 94 | ||
| 95 | public function parse($value) |
|
| 96 | { |
|