Commit Graph

10 Commits

Author SHA1 Message Date
Updated to PHP 8.0.
All checks were successful
continuous-integration/drone/push Build is passing
- Release version 1.3.3.
- Most property, argument and return types have been defined and are now enforced.
- Drone now performs tests for both PHP 7.4 and 8.0. Extend for future versions.
2021-11-24 19:31:59 +01:00
Added absolute pathing for unit tests.
All checks were successful
continuous-integration/drone/push Build is passing
2021-01-28 16:07:48 +01:00
Added categories to the router, without breaking (most) backwards compatibility.
Some checks failed
continuous-integration/drone/push Build is failing
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.
2021-01-28 15:42:38 +01:00
Added 'addParameter()' method to routerLoadViewAndControllerEvent, and to routerCallViewEvent.
This allows the developer to add parameters retrieved outside of the matching system.
Requested by CLIComponent.
2021-01-24 13:49:34 +01:00
Fixed critical security bug, risking unprotected views to be exposed.
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.
2021-01-19 21:16:39 +01:00
ed90b3badb Implemented the usage of multiple viewMethods.
- 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.
2019-09-17 17:24:12 +02:00
Implemented changes requested by FuzeWorks\Application
- 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
2019-03-04 21:33:38 +01:00
Implemented unit tests for Router.
Fixes #4
2019-02-11 19:23:45 +01:00
Added placeholder file for temp directory, otherwise unit testing doesn't work. 2019-02-01 12:02:15 +01:00
0d867c7371 Created MVCR Framework
Implemented MVCR Framework
2019-02-01 00:55:49 +01:00