| @@ 155-162 (lines=8) @@ | ||
| 152 | * |
|
| 153 | * @return string |
|
| 154 | */ |
|
| 155 | public function getAppValue(string $key): string { |
|
| 156 | $defaultValue = null; |
|
| 157 | if (array_key_exists($key, $this->defaults)) { |
|
| 158 | $defaultValue = $this->defaults[$key]; |
|
| 159 | } |
|
| 160 | ||
| 161 | return $this->config->getAppValue(Application::APP_NAME, $key, $defaultValue); |
|
| 162 | } |
|
| 163 | ||
| 164 | /** |
|
| 165 | * Set a value by key |
|
| @@ 192-201 (lines=10) @@ | ||
| 189 | * |
|
| 190 | * @return string |
|
| 191 | */ |
|
| 192 | public function getUserValue(string $key): string { |
|
| 193 | $defaultValue = null; |
|
| 194 | if (array_key_exists($key, $this->defaults)) { |
|
| 195 | $defaultValue = $this->defaults[$key]; |
|
| 196 | } |
|
| 197 | ||
| 198 | return $this->config->getUserValue( |
|
| 199 | $this->userId, Application::APP_NAME, $key, $defaultValue |
|
| 200 | ); |
|
| 201 | } |
|
| 202 | ||
| 203 | /** |
|
| 204 | * Set a user value by key |
|