| @@ 43-52 (lines=10) @@ | ||
| 40 | * |
|
| 41 | * @return KeyValue |
|
| 42 | */ |
|
| 43 | public function getAction(Request $request, $key) |
|
| 44 | { |
|
| 45 | $storeHandler = $this->get('maikuro_distributed_configuration.store_handler'); |
|
| 46 | ||
| 47 | $view = View::create() |
|
| 48 | ->setStatusCode(Codes::HTTP_OK) |
|
| 49 | ->setData($storeHandler->get($key)); |
|
| 50 | ||
| 51 | return $this->getViewHandler()->handle($view, $request); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Create a key value. |
|
| @@ 99-109 (lines=11) @@ | ||
| 96 | * |
|
| 97 | * @return Response |
|
| 98 | */ |
|
| 99 | public function deleteAction(Request $request, $key) |
|
| 100 | { |
|
| 101 | $view = View::create() |
|
| 102 | ->setStatusCode(Codes::HTTP_NO_CONTENT) |
|
| 103 | ; |
|
| 104 | ||
| 105 | $storeHandler = $this->get('maikuro_distributed_configuration.store_handler'); |
|
| 106 | $storeHandler->remove($key); |
|
| 107 | ||
| 108 | return $this->getViewHandler()->handle($view); |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * handleForm. |
|