Simon Sessingø
67a00c6800
- Optimized Input class.
...
- Input class now returns array instead of InputItem instance when object is of type array.
- Optimized key behavior in Input class.
- Optimized arrayToParams method in RouterBase class.
- Added getMergableSettings method to RouterGroup to avoid middleware merge; as they will already be loaded.
2016-04-22 12:55:24 +02:00
Simon Sessingø
1420203149
- Added custom ExceptionHandler example to documentation.
...
- Fixed reference to request() helper in Input class.
- Changed RouterBase handleException method to support 404-exceptions.
2016-04-21 07:16:29 +02:00
Simon Sessingø
2afe784f47
[BUGFIX] Fixed middlewaresToLoad logic used before any routes loaded in RouterBase.
2016-04-16 13:08:32 +02:00
Simon Sessingø
7a429cec1d
[BUGFIX] Fixed get-parameters as array (param[id]=value) causing array-to-string notice.
2016-04-14 23:52:08 +02:00
Simon Sessingø
3da7c4b446
- Fixed getIp in HttpRequest class not picking up local-ip.
...
- Made setdefaultNamespace method chainable.
- Simplified SimpleRouter class.
2016-04-11 22:37:15 +02:00
Simon Sessingø
22563671c5
[TASK] Moved group-middleware rendering to routeRequest to ensure all route-urls has been initialised.
...
- Optimisations.
2016-04-09 15:26:18 +02:00
Simon Sessingø
491e920cfc
[BUGFIX] Fixed only match group route if prefix is set
2016-04-09 10:01:02 +02:00
Simon Sessingø
5f95290e4b
[OPTIMISATION] Optimised exception-message thrown when not using IExceptionHandler interface.
2016-04-09 09:45:39 +02:00
Simon Sessingø
7234415e24
[TASK] Made abstract ExceptionHandler class an interface.
...
- Updated documentation to reflect new changes.
2016-04-09 09:42:57 +02:00
Simon Sessingø
257875c6f9
[TASK] Load group middleware if prefix matches
...
- Middlewares from groups are now loaded if prefix matches.
- Optimisations.
2016-04-09 09:25:41 +02:00
Simon Sessingø
457dbc5710
[BUGFIX] Fixed issue #83
...
- Added more tests.
2016-04-09 07:51:03 +02:00
Simon Sessingø
fc4fd0edf1
[FEATURE] Added ExceptionHandling functionality + tests.
...
- Somehow the ExceptionHandling functionality never really get implemented and/or got lost in translation, it's back whup!
- Added some basic tests for Middleware + routing.
2016-04-09 07:05:49 +02:00
Simon Sessingø
b34738a51a
[OPTIMISATION] Optimised CSRF-token management.
2016-04-09 05:51:27 +02:00
Simon Sessingø
975c27659c
[BUGFIX] Bugfixes and optimisations
...
- Fixed issue causing nested groups not merging namespace correctly.
- Fixed issue causing longer urls (for example: /route) to have higher priority than (/route/match) in some cases.
2016-04-07 23:16:50 +02:00
Simon Sessingø
27371dfa11
[FEATURE] Added support for multiple aliases
2016-04-07 19:33:04 +02:00
Simon Sessingø
6e102711a8
[BUGFIX] Fixed nested groups not merging settings to routes
2016-04-07 01:38:03 +02:00
Simon Sessingø
4d58fbf7b5
[TASK] Added rewrite_uri parameter to Request class
2016-03-19 19:14:07 +01:00
Simon Sessingø
35bb58818e
[BUGFIX] Readded rendering of groups
2016-03-19 19:00:23 +01:00
Simon Sessingø
1bafbab56b
[TASK] Moved RouterException. Readded lost stuff from Request.
2016-03-19 16:27:25 +01:00
Simon Sessingø
b29f2ce37d
[FEATURE] Added custom boot managers
2016-03-19 16:14:36 +01:00
Simon Sessingø
db78135d19
[BUGFIX] Only render group if prefix matches.
2016-03-16 19:57:54 +01:00
Simon Sessingø
765204f552
[FEATURE] Moved loadedRoute to request so it can be easily overwritten
...
from middleware.
2016-01-15 10:34:59 +01:00
Simon Sessingø
14a030294e
[BUGFIX] Minor bugfixes and optimisations
...
- Fixed getRoute sometimes not passing current loaded route.
- Fixed optional parameters in some occasions not working properly.
2016-01-14 16:37:36 +01:00
Simon Sessingø
df2545dd37
[TASK]
...
- Added support for setups where getallheaders function is not availible.
- Made matchDomain method in RouterGroup always return boolean.
2015-12-19 20:15:10 +01:00
Simon Sessingø
3510c4c5a4
[BUGFIX] Wrong validation on domain
2015-12-19 18:25:18 +01:00
Simon Sessingø
ce27196083
[BUGFIX] Bugfixes.
...
- Fixed not validating domain on
- Other small changes.
2015-12-19 18:07:18 +01:00
Simon Sessingø
cbaa0bcaac
[FEATURE] getRoute now support domains.
...
- Optimisations + bugfixes.
2015-12-19 09:21:12 +01:00
Simon Sessingø
5a501db767
[TASK] Csrf-token fixes + readded BaseCsrfVerifier.
...
- Readded BaseCsrfVerifier middleware.
- Csrf-token expire time is now updated on each page refresh.
- CSRF-token update now happens after the route has been loaded, to ensure
no faulty "Invalid csrf-token" exceptions.
2015-12-14 13:36:38 +01:00
Simon Sessingø
4f07f38cf5
[BUGFIX] Fixed getting current route not always returning current url.
2015-12-12 23:38:48 +01:00
Simon Sessingø
c67ab20ddd
[BUGFIX] Merge current parameters with new provided ones.
2015-12-12 22:53:25 +01:00
Simon Sessingø
ad1ce21c66
[BUGFIX] Fixed getParams not being passed when using getRoute on current
...
route.
2015-12-12 20:42:06 +01:00
Simon Sessingø
23ee53060e
Merge branch 'development' of https://github.com/skipperbent/simple-php-router into development
...
Conflicts:
src/Pecee/SimpleRouter/RouterBase.php
2015-12-11 18:23:19 +01:00
Simon Sessingø
77ba9f165e
[BUGFIX] Fixed get params warning.
2015-12-11 18:21:00 +01:00
Simon Sessingø
0bec524606
[OPTIMISATION] Optimisations + bugfixes.
...
- Fixed references to Pecee framework.
- Fixed variables not being initialised before usage.
- Cleaned up duplicate checks.
- Other small optimisations and bugfixes.
2015-12-11 18:06:52 +01:00
Simon Sessingø
59956d5fca
[BUGFIX] Optimisations + bugfixes.
2015-12-10 04:12:44 +01:00
Simon Sessingø
3ba2cec8af
[OPTIMISATION] Optimised more foreach loops to improve performance.
2015-12-10 03:41:10 +01:00
Simon Sessingø
d36880e9a0
[OPTIMISATION] Optimised routes loop.
2015-12-10 03:36:50 +01:00
Simon Sessingø
c74d83796f
[FEATURE] Added sub-domain routing.
...
- Updated documentation.
2015-12-10 03:31:57 +01:00
Simon Sessingø
b1768d86f7
[TASK] Removed baseCfsrVerifier from constructor to make it completely
...
optional (to increase speed on project which doesn't need it).
2015-12-08 16:29:12 +01:00
Simon Sessingø
8efec07a8b
[FEATURE]
...
- Added support for custom ExceptionHandlers on group level.
- Routes now contain parent group, if any.
- Fixed wrong usage of required parameter.
2015-11-22 20:24:43 +01:00
Simon Sessingø
3b4954821a
[FEATURE] Optimised route matching, added optional parameters.
...
- Optimised route matching. This should be way more officient and also
seems to fix issues with getting the current route using the getRoute class.
- Added support for optional routes, for example: {id?}.
- Updated documentation to reflect new changes.
2015-11-21 19:31:06 +01:00
Simon Sessingø
3fc81b6492
[TASK] Readded Pecee folder.
2015-11-02 08:08:49 +01:00
Simon Sessingø
b400b86322
[TASK] Removed Pecee folder.
2015-11-02 08:06:49 +01:00
Simon Sessingø
f215eaa9cf
[BUGFIX] Bugfixes and optimisations
...
- Fixed support for multiple middlewares using array.
- Fixed match and parameters-match not not being merged when used on group.
2015-11-01 09:11:17 +01:00
Simon Sessingø
8557741083
[FEATURE] Bugfixes and optimisations
...
- Changed Middleware to interface - as it's easier to inherit and use in
other frameworks/projects.
- RouterController now loads method based on request-method.
- Changed references to old Middleware abstract class.
- Middleware must now be instance of IMiddleware instead of Middleware
class.
2015-11-01 08:23:46 +01:00
Simon Sessingø
637b998f02
[TASK] Made RouterBase use singleton HttpRequest class.
2015-11-01 07:48:29 +01:00
Simon Sessingø
846c9e6584
[BUGFIX] Optimised getRoute for custom urls.
2015-11-01 07:36:13 +01:00
Simon Sessingø
649ed28a91
[BUGFIX] Fixed Exceptions due to route null value.
2015-10-30 02:27:44 +01:00
Simon Sessingø
d3ed3a61b5
[BUGFIX] Middlewares are no longer loaded on invalid routes
2015-10-27 16:42:39 +01:00
Simon Sessingø
c2cf2334e7
[OPTIMISATION] Optimised router handling - router will now use the order provided when loading routes.
2015-10-27 14:01:19 +01:00