Commit Graph

17 Commits

Author SHA1 Message Date
Simon Sessingø
9f509ac818 Added unicode parameter regex support. 2017-08-23 22:49:35 +01:00
Simon Sessingø
65c811356d Fixed url parsing for unicode characters. 2017-08-23 21:04:11 +01:00
Simon Sessingø
b7f5d31544 Fixed double / when calling findUrl on routes with the first
parameter optional.
2017-08-17 23:31:27 +01:00
Simon Sessingø
74187ee326 Fixes and development
- `$parameter` argument in `findUrl` method now supports both string,
array and null value to avoid confusion.

- Using return value in callbacks now displays value (issue: #257)
2017-08-13 03:06:27 +01:00
Simon Sessingø
62f0075cf3 Fixed wrong url matching on some paths (issue: #253 - thanks @alejoloe007jb) 2017-08-07 22:18:36 +02:00
Simon Sessingø
883d8a6b0e Fixes for issue #248 2017-08-01 21:09:18 +02:00
Simon Sessingø
3a7b27796a Url matching fixes 2017-08-01 18:29:47 +02:00
Simon Sessingø
b07348a3df Development
- Removed temporary `RouterException` class.
- Added object-types to parameters in `CallbackExceptionHandler` and `SimpleRouter` classes.
- Router now renders groups even if callback is null.
- Renamed `setMiddleware` to `addMiddleware` in `Route` class and `IRoute` interface.
- `addMiddleware` now accept both object and class strings in `Route` class.
- `addExceptionHandler` now accept both object and class strings in `RouteGroup` class.
- Added unit-test for rewrite-exception message change: `testRewriteExceptionMessage` in `RouterRewriteTest`.
- Fixed typo: renamed `testSimularUrls` to `testSimilarUrls` in `RouterUrlTest`.
2017-07-08 11:21:18 +02:00
Simon Sessingø
0a58d36606 Development
- Fixed: `RouteController` not matching certain urls.
- Made `RouteResource` more strict in url-matching.
- Added PHPUnit `RouterControllerTest` class.
- Fixed merged `testSimularUrls` method in `RouterUrlTest`.
2017-03-06 02:53:44 +01:00
Simon Sessingø
db024b9588 Added simular routes PHPUnit test 2017-03-06 02:21:13 +01:00
Simon Sessingø
ff3f1bdcdd Development
- Fixed issue #227 causing custom resource-routes not to be loaded after latest update.
- Optimized `RouteResource` class.
- Renamed `IRestController` to `IResourceController`.
- Added unit-tests for RouterResource.
- Simplified unit-tests with the `TestRouter` custom router class.
2017-03-05 17:09:46 +01:00
Simon Sessingø
523d49359b Development
- Fixed where method calling itself instead of setWhere.
- Added unit-tests for regex.
2017-01-19 18:40:47 +01:00
Simon Sessingø
6213f2fb75 Development
- Optimised Input-classes.
- `get` and `getObject` methods on `Input` now supports filtering on multiple method-types when using the `$method` parameter.
- Input classes now know how to parse that stupid nested $_FILES array.
- It's now possible to change method-names on ResourceControllers.
- Removed `getValue` and `setValue` from `InputFile` classes.
- Ensured that request-method are only parsed from $_POST or $_SERVER.
- Fixed minor parameter-issues with subdomain routing.
- Added PHPDocs.
- Added even more unit-tests.
- Many small optimisations tweaks.
2016-11-26 04:30:00 +01:00
Simon Sessingø
dfd32c0904 Bugfixes
- Moved middleware stuff back to Route class.
- Fixed Tests not working due to invalid method.
- Updated depricated method-calls in demo-project.
2016-11-21 04:06:45 +01:00
Simon Sessingø
8370d3d94e Development
- Made easier to extend.
- Added IRoute class.
- Changed namespace for Route classes.
- Moved find-url related stuff to Route classes itself.
- Added more tests for finding urls.
- Added support for custom names on RouteController and RouteResource.
- Removed depricated methods.
- Updated documentation.
- Updated demo-project to reflect changes.
- Other small bugfixes and improvements.
2016-11-21 01:50:28 +01:00
Simon Sessingø
7e63197252 Major overhaul 2016-11-19 19:24:05 +01:00
Simon Sessingø
ed1ac74e7a Development
- Fixed updatae causing middlewares to sometimes load on wrong routes.
- Converted project to PSR/2.
- Updated InputCollection class and added get method for easy access to values.
- Complete refactor of RouterBase.
- Added findRoute method to RouterBase.
- It's now possible to change parameter modifiers and symbol by overwriting properties on RouterBase.
- Added RouterUrlTest unit-test for testing route-urls.
- Added IRestController that can be easily implemented in custom ResourceController-classes.
- It's now possible to use "-" instead of "_" when using getHeader method in Request class.
- Added PHPDocs.
- Fixed "/" route sometimes returning "//" as url.
- Optimisations and bugfixes.
2016-11-19 02:48:19 +01:00