response->setStatusCode(404); return $this->response; } $storageService = new StorageService(); $location = $storageService->getCiImageUrl($image->path); $this->response->redirect($location); } /** * @Get("/qrcode/img", name="web.qrcode_img") */ public function qrcodeImageAction() { $text = $this->request->getQuery('text'); $level = $this->request->getQuery('level', 'int', 0); $size = $this->request->getQuery('size', 'int', 3); $url = urldecode($text); PHPQRcode::png($url, false, $level, $size); $this->response->send(); exit; } /** * @Post("/{id:[0-9]+}/learning", name="web.learning") */ public function learningAction($id) { $service = new LearningService(); $service->handle($id); return $this->jsonSuccess(); } }