Introduce Response for Modules to create a testable way for module responses

This commit is contained in:
Philipp 2021-11-21 20:06:36 +01:00
parent ad5b0762b0
commit 561aba18e3
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
37 changed files with 309 additions and 113 deletions

View file

@ -701,8 +701,8 @@ class App
}
// Let the module run it's internal process (init, get, post, ...)
$content = $module->run($_POST, $_REQUEST);
$page->run($this, $this->baseURL, $this->args, $this->mode, $content, $this->l10n, $this->profiler, $this->config, $pconfig);
$response = $module->run($_POST, $_REQUEST);
$page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig);
} catch (HTTPException $e) {
(new ModuleHTTPException())->rawContent($e);
}