service = $service; $this->metadata = $metadata; $this->user = $user; } public function getActionRead(): stdClass { return $this->service->getDataForFrontend(); } /** * @return mixed * @throws Forbidden */ public function getActionGet(Request $request) { if (!$this->user->isAdmin()) { throw new Forbidden(); } $key = $request->getQueryParam('key'); return $this->metadata->get($key, false); } }