Commit Graph

32 Commits

Author SHA1 Message Date
016fa03ac2
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
51153520e2
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
3f522c55fa
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
90e6f64c40
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
9d86c03f02
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
55e0848a70 Made models able to load models. 2020-07-12 11:59:38 +02:00
9572d27043
Allowed the view to load other views and other controllers. 2020-06-13 11:54:44 +02:00
d6fcf1c750
Release version 1.2.2.
Now supports loading Controllers, Models and Views using the autoloader, which for some reason wasn't supported.
2020-06-07 12:18:34 +02:00
e30d4ad366 Fixed bug where controller was not changed after a routerCallViewEvent
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.
2020-05-12 13:10:50 +02:00
cd1e19e784 Merge branch 'development' into 'master'
Release version 1.2.0

Closes #5, #3, and #4

See merge request fuzeworks/MVCR!4
2019-09-21 14:53:54 +00:00
479c714dee Merge branch 'master' into 'development'
# Conflicts:
#   .gitlab-ci.yml
#   composer.json
#   src/FuzeWorks/Controller.php
#   src/FuzeWorks/Event/RouterLoadViewAndControllerEvent.php
#   src/FuzeWorks/Model.php
#   src/FuzeWorks/Router.php
#   src/FuzeWorks/View.php
#   src/FuzeWorks/Views.php
#   test/mcr/RouterTest.php
#   test/phpunit.xml
2019-09-21 14:50:26 +00:00
fdf998c37b
Release version 1.2.0 2019-09-21 16:37:21 +02:00
06fc770a37
Release version 1.2.0-RC5 2019-09-18 00:02:18 +02:00
32a0e83e40 Merge branch 'development' into 'development'
Implemented the usage of multiple viewMethods.

See merge request fuzeworks/MVCR!3
2019-09-17 20:19:52 +00: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
ea0cf92d74 Merge branch 'holiday-branch' into 'development'
Release 1.2.0-RC4

See merge request fuzeworks/MVCR!2
2019-08-21 17:02:16 +00:00
c7600ffcd7
Release 1.2.0-RC4 2019-08-21 18:57:40 +02:00
af476c6f3e Updated some comments to reflect its functionality better 2019-07-22 11:46:43 +02:00
f15c971ace
Release 1.2.0-RC3 2019-03-04 21:42:35 +01:00
f49c5dd882
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
be414aa2cd
Implemented RouterCallViewEvent
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.
2019-03-01 11:07:24 +01:00
f6baf1142c
Made all properties of the Model, View and Controller protected.
These should not be accessible from outside these types of objects. Also made FuzeWorks core a requirement and not a dev-requirement.
2019-03-01 11:04:12 +01:00
4384ee23b1
Release release candidate 2 (In coordination with other FuzeWorks projects) 2019-02-11 19:56:25 +01:00
5b66dd5f29
Changed which properties Models, Views and Controllers contain.
They no longer share the Factory.

Fixes #5
2019-02-11 19:47:24 +01:00
d8acd801d2
Implemented routerLoadCallableEvent
Fixes #3
2019-02-11 19:31:49 +01:00
3613a04f49
Implemented unit tests for Router.
Fixes #4
2019-02-11 19:23:45 +01:00
d87da7eaf4 Merge branch 'development' into 'master'
Created MVCR Framework

Closes #1 and #2

See merge request fuzeworks/MVCR!1
2019-02-01 11:14:26 +00:00
393bd70d8a Created MVCR Framework 2019-02-01 11:14:26 +00:00
3edbe99f35
Added placeholder file for temp directory, otherwise unit testing doesn't work. 2019-02-01 12:02:15 +01:00
593be6b5d0
Implemented minor documentation and continuous integration 2019-02-01 11:57:41 +01:00
0d867c7371 Created MVCR Framework
Implemented MVCR Framework
2019-02-01 00:55:49 +01:00
5a184fbf8c Initial commit 2019-02-01 00:38:11 +01:00