| @@ 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 |
|
| @@ 111-120 (lines=10) @@ | ||
| 108 | * |
|
| 109 | * @return mixed |
|
| 110 | */ |
|
| 111 | public function getConfig($key) |
|
| 112 | { |
|
| 113 | if (!array_key_exists($key, $this->configuration)) { |
|
| 114 | throw new \Exception( |
|
| 115 | sprintf('key "%s" does\'t exist', $key) |
|
| 116 | ); |
|
| 117 | } |
|
| 118 | ||
| 119 | return $this->configuration[$key]; |
|
| 120 | } |
|
| 121 | } |
|
| 122 | ||