| @@ 37-47 (lines=11) @@ | ||
| 34 | $this->values[$name] = $value; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function has(string $name): bool |
|
| 38 | { |
|
| 39 | $ok = array_key_exists($name, $this->values); |
|
| 40 | if ($ok) { |
|
| 41 | return true; |
|
| 42 | } |
|
| 43 | if ($this->parent) { |
|
| 44 | return $this->parent->has($name); |
|
| 45 | } |
|
| 46 | return false; |
|
| 47 | } |
|
| 48 | ||
| 49 | public function add(string $name, array $array) |
|
| 50 | { |
|
| @@ 90-99 (lines=10) @@ | ||
| 87 | throw new ConfigurationException("Config option \"$name\" does not exist."); |
|
| 88 | } |
|
| 89 | ||
| 90 | protected function fetch($name) |
|
| 91 | { |
|
| 92 | if (array_key_exists($name, $this->values)) { |
|
| 93 | return $this->values[$name]; |
|
| 94 | } |
|
| 95 | if ($this->parent) { |
|
| 96 | return $this->parent->fetch($name); |
|
| 97 | } |
|
| 98 | return null; |
|
| 99 | } |
|
| 100 | ||
| 101 | public function parse($value) |
|
| 102 | { |
|