This is as bad as the global variable, however at least will have better
static analysis of it.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Extracts the redirection to database and table pages to the
HomeController for an actual redirection instead of an implicit one.
Removes the Application::getRequest() method as the ServerRequest object
should be an immutable object.
Adds a Routing::$route static variable to be used at the places that the
ServerRequest object is not available.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
- Extracts the ErrorHandler, Config and Template dependencies from the
Application class.
- Loads HTTP ServerRequest object after loading the user config.
- Requires a Config object for the Template class.
- Disables Twig's cache if an exception is thrown before loading the
user config. This way a possible different cache directory will not be
used.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>