config = $config; } public function __invoke(ServerRequest $request): void { /** @var string|null $key */ $key = $request->getParsedBodyParam('key'); if (! isset($key)) { $this->response->setRequestStatus(false); $this->response->addJSON(['message' => Message::error()]); return; } $this->response->addJSON(['value' => $this->config->get($key)]); } }