export = $export; $this->response = $response; } public function __invoke(ServerRequest $request): void { if (! $request->hasBodyParam('export_type')) { $errorMessage = __('Missing parameter:') . ' export_type' . MySQLDocumentation::showDocumentation('faq', 'faqmissingparameters', true) . '[br]'; $this->response->setRequestStatus(false); $this->response->addHTML(Message::error($errorMessage)->getDisplay()); return; } /** * Include the appropriate Schema Class depending on $export_type * default is PDF */ try { $this->export->processExportSchema($request->getParsedBodyParam('export_type')); } catch (RuntimeException $exception) { $this->response->setRequestStatus(false); $this->response->addHTML(Message::error($exception->getMessage())->getDisplay()); } } }