| @@ 93-102 (lines=10) @@ | ||
| 90 | * |
|
| 91 | * @throws \Exception |
|
| 92 | */ |
|
| 93 | public function setConfig($key, $value) |
|
| 94 | { |
|
| 95 | if (!array_key_exists($key, $this->configuration)) { |
|
| 96 | throw new \Exception( |
|
| 97 | sprintf('key "%s" does\'t exist', $key) |
|
| 98 | ); |
|
| 99 | } |
|
| 100 | ||
| 101 | $this->configuration[$key] = $value; |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @param $key |
|
| @@ 110-119 (lines=10) @@ | ||
| 107 | * |
|
| 108 | * @throws \Exception |
|
| 109 | */ |
|
| 110 | public function getConfig($key) |
|
| 111 | { |
|
| 112 | if (!array_key_exists($key, $this->configuration)) { |
|
| 113 | throw new \Exception( |
|
| 114 | sprintf('key "%s" does\'t exist', $key) |
|
| 115 | ); |
|
| 116 | } |
|
| 117 | ||
| 118 | return $this->configuration[$key]; |
|
| 119 | } |
|
| 120 | } |
|
| 121 | ||