/** * @return ExportRequest */ protected function saveQueriesWithMockFeatureTypes() { $featureTypeDeclarations = array("type-1", "type-2"); foreach ($featureTypeDeclarations as $key => $declaration) { $this->queryManager->save($this->getMockupQuery($declaration)); } $exportRequest = new ExportRequest(array()); $exportRequest->setIds($featureTypeDeclarations); return $exportRequest; }
/** * @Method("POST") * @Route("export") * @param ExportRequest $request * @return ExportResponse */ public function export($request) { $features = $this->queryManager->listQueriesByFeatureTypes($this->featureService, $request->getIds()); return new ExportResponse($features, $request->getFilename(), $request->getType(), $request->getEncodingFrom(), $request->getEnclosure(), $request->getDelimiter(), $request->isEnableDownload()); }