| @@ 102-111 (lines=10) @@ | ||
| 99 | * |
|
| 100 | * @throws \Exception |
|
| 101 | */ |
|
| 102 | public function setConfig($key, $value) |
|
| 103 | { |
|
| 104 | if (!array_key_exists($key, $this->configuration)) { |
|
| 105 | throw new \Exception( |
|
| 106 | sprintf('key "%s" does\'t exist', $key) |
|
| 107 | ); |
|
| 108 | } |
|
| 109 | ||
| 110 | $this->configuration[$key] = $value; |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * @param $key |
|
| @@ 120-129 (lines=10) @@ | ||
| 117 | * |
|
| 118 | * @return mixed |
|
| 119 | */ |
|
| 120 | public function getConfig($key) |
|
| 121 | { |
|
| 122 | if (!array_key_exists($key, $this->configuration)) { |
|
| 123 | throw new \Exception( |
|
| 124 | sprintf('key "%s" does\'t exist', $key) |
|
| 125 | ); |
|
| 126 | } |
|
| 127 | ||
| 128 | return $this->configuration[$key]; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * Get last received XML output of MediaInfo. |
|