Add router config

- Introduce route.config.php structure
- Adding config loader for routes
- Adapt Module class (separation of duties)
- Add tests
This commit is contained in:
Philipp Holzer 2019-09-26 21:18:01 +02:00
parent b51dedd7e7
commit 0e5cb88888
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
7 changed files with 401 additions and 209 deletions

View file

@ -150,13 +150,6 @@ class Module
* From the request URL, routing consists of obtaining the name of a BaseModule-extending class of which the
* post() and/or content() static methods can be respectively called to produce a data change or an output.
**/
// First we try explicit routes defined in App\Router
$router->collectRoutes();
$data = $router->getRouteCollector();
Core\Hook::callAll('route_collection', $data);
$module_class = $router->getModuleClass($args->getCommand());
// Then we try addon-provided modules that we wrap in the LegacyModule class