Simon Sessingø
83c73a4240
Callback, faking route and documentation updates
2016-11-15 05:44:24 +01:00
Simon Sessingø
bc14790a67
Updated documentation
2016-11-15 03:55:28 +01:00
Simon Sessingø
d5e7a13d89
Development + bugfixes
2016-11-15 03:43:26 +01:00
Simon Sessingø
6de0700e17
Bugfixes
...
- Removed debugging constructor.
- Updated documentation.
2016-11-15 00:11:57 +01:00
Simon Sessingø
28c3370b67
Fixed group not adding multiple middlewares
2016-11-07 04:55:43 +01:00
Simon Sessingø
8740db9582
Development
...
- Isolated Http classes from router.
- Removed getInstance from Request object - current router request should now be obtained through SimpleRouter::request().
- Fixed broken test cases.
- Added test for regular expression match.
- Updated documentation to reflect changes.
- Added more helper examples to documentation.
- Added helpers to demo-project.
- Optimisations.
2016-11-07 04:40:28 +01:00
Simon Sessingø
2d57b45c7b
Fixed urls not being visible
2016-11-06 09:04:05 +01:00
Simon Sessingø
98cc8504d4
Development
...
- Group only loads if prefix matches (if any).
2016-11-06 08:13:47 +01:00
Simon Sessingø
035a5b1629
Development
...
- Added support for cloudflare when using getIp method in Request.
- Fixed undefined variable notice in RouterBase class.
2016-11-05 23:07:14 +01:00
Simon Sessingø
43e05ad821
Minor optimisations
2016-10-27 19:15:38 +02:00
Simon Sessingø
2fd32868c2
Optimisations and bugfixes
2016-10-27 17:06:05 +02:00
Simon Sessingø
e51b72f0e0
Development
...
- Changed from http_build_query to custom solution as it doesn't support querystrings with "%" on some php versions.
2016-10-27 16:44:35 +02:00
Simon Sessingø
a8620cbc70
Updates
...
- Simplified exception-handling (see demo project for examples).
- Optimised sample-project.
- Optimised and added further unit-tests.
- Optimised and bugfixes.
2016-10-20 08:31:21 +02:00
Simon Sessingø
3c9a675f25
Optimised middleware load order
2016-09-28 12:29:30 +02:00
Simon Sessingø
dfccd99f2f
Automatically push middlewares if multiple in nested group.
2016-09-28 12:21:23 +02:00
Simon Sessingø
fab0d0641c
Allow for default parameters (including A-Z, a-z, 0-9 and "-") when parsing parameters in RouterResource.
2016-06-14 22:20:05 +02:00
Simon Sessingø
4169716f87
Bugfix
...
- Fixed some routes with ending slash not matching on when using Ressource.
2016-06-04 18:44:33 +02:00
Simon Sessingø
53e5b5362f
Development
...
- Enhanced regular expression used for matching parameters.
- Added basic unit-tests for parameters.
- Fixed typos in PHP-docs and other minor optimizations.
2016-06-04 18:20:46 +02:00
Simon Sessingø
6780b24e59
Development
...
- Optimized the way parameters are parsed as a result, simple-router now supports routes like `/{param1}-{param2}.json`.
- Replaced reg-ex for parameter-matching with `\w` which means that default parameter matching on routes now include `_` (underscore) per default.
- Simplified `MiddlewareTest` class.
2016-06-04 15:12:04 +02:00
Simon Sessingø
f98e5ac59d
- Optimized handleException method in RouterBase.
2016-04-23 10:52:51 +02:00
Simon Sessingø
a2dbf4149b
- Added route to ExceptionHandler so Middlewares can be loaded.
2016-04-23 10:50:56 +02:00
Simon Sessingø
ba736b47a3
- Removed support from middlewares on each load - this should be implemented in custom Router instead.
...
- Updated documentation to reflect how to implement Middlewares loaded on each route.
2016-04-22 15:37:27 +02:00
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ø
f3ac9dc47c
[BUGFIX] Fixed notice
2016-04-09 15:38:45 +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ø
2f2c3ca3ca
[OPTIMISATIONS] Optimised code and removed unused references
2016-04-09 05:58:18 +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ø
438d3c258b
[TASK] Readded merging
2016-03-19 17:11:54 +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ø
5483ffe458
[TASK] Readded group match inheritence .
...
- Settings on routes now have higher priority when merging settings from
group.
2016-03-18 17:43:57 +01:00
Simon Sessingø
6d8e95fcaa
[TASK] Match on group are no longer merged to child routes.
2016-03-18 15:21:45 +01:00
Simon Sessingø
db78135d19
[BUGFIX] Only render group if prefix matches.
2016-03-16 19:57:54 +01:00
Simon Sessingø
115c8e510a
[BUGFIX] Added urldecode to RouterRessource, RouterRoute and
...
RouterController class to ensure that urls with special letters can be
picked up by a custom regular expression (read documentation: match).
2016-03-01 22:50:26 +01:00
Simon Sessingø
35ee79d02c
[TASK] Fixed regex causing optional parameters to sometimes catch required
...
parameters value.
2016-01-23 16:10:44 +01:00