Categories can be added using the routeConfig, by using a 'category' key. Router::route() can then distinguish between them using its second parameter.
Also added drone support.
Had to make some design concessions. ViewType can no longer be distilled using the routeMatches, but must instead now be provided by the more static routeConfig. This way, the chosen ViewType shall always be one that is chosen by the developer.
Also added some other smaller features, as requested by other components and plugins:
- Now added a 'namespacePrefix' for Router::defaultCallable. Allows for the usage of Views and Controllers from a namespace different from '\\Application', from within the router sphere.
- Added a $routes = [] parameter to Router::route(), allowing the developer to bypass the global routes list if necessary.
Router::defaultCallable did not change the controller in the view upon a change in the RouterCallViewEvent.
This has been remedied by adding a check and performing the change when that check results in a discrepency.
- This change allows the developer to sort methods with the usual Priority. The first valid method found shall be used.
- Dependency for implementing methods in a REST API.
- Added Priorities to the routes array. Routes can now be saved with priorities, making higher priority routes load before lower priorities
- Fixed bug where callable is not reset upon attempting routing a new route after another was not satisfied
This event gets called right before defaultCallable() invokes the requested method on the requested view. This allows other classes to intervene when required. Currently used by the WebComponent to suppress CSRF Exceptions.