Commit Graph

90 Commits

Author SHA1 Message Date
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
Simon Sessingø f5a32cf520 [BUGFIX] Fixed router paths. 2015-10-27 10:35:57 +01:00
Simon Sessingø 1843ea0594 [BUGFIX] Fixed routes always matching /show/{id} when other routes are added. 2015-10-27 10:29:40 +01:00
Simon Sessingø 2a66350883 [BUGFIX] Fixed missing "/" in getRoute on some rare occasions. 2015-10-24 23:24:06 +02:00
Simon Sessingø 20fc067765 [FEATURE] If no parameters are specified in the route, getRoute will now
add the parameters provided to the method instead.
2015-10-24 23:18:16 +02:00
Simon Sessingø bdb5b2dead [BUGFIX] Fixed missing / in beginning of url in getRoute when route does not exist. 2015-10-22 00:17:49 +02:00
Simon Sessingø 1ba05b923c [FEATURE] Csrf token
- Added functionality to CsrfToken class.
- Added header support to Request class.
- Added option to set BaseCsrfVerifier class in RouterBase and
  SimpleRouter.
2015-10-21 18:12:53 +02:00
Simon Sessingø 58e4eb85bb [BUGFIX] Fixed method not allowed exception.
- Method request type are now checked on all classes in the RouterBase class.
2015-10-21 10:14:21 +02:00
Simon Sessingø 626a3b2f6a [TASK] Changes
- Added support for alias on RouterRoute.
- Added typo in resource (renamed class from Ressource to Resource).
- Added optional settings parameter in most of the methods in the
  SimpleRouter class.
2015-10-21 00:27:47 +02:00
Simon Sessingø 2524428926 [BUGFIX] Bugfixing
- Urls now always returns ending slash when using getRoute().
- Fixed common errors with routing.
- Simplified getRoute method.
2015-10-20 23:54:05 +02:00
Simon Sessingø c1a6c63dc7 [FEATURE/BUGFIX] Improvements
- Added match method to match specific regular expression.
- GetRoute now returns provided controller and method if no match is found.
- Bugfixes and other minor improvements.
2015-10-18 23:18:58 +02:00
Simon Sessingø b3b362a9e6 [BUGFIX] Improvements
- Fixed errors with getRoute method.
- Added Response and Request classes.
- Added CSRF stuff.
- Cleanup and bugfixes.
2015-10-18 17:36:06 +02:00
Simon Sessingø 5c81da7b77 [BUGFIX] Bugfixes
- Made sure that urls are always presented in the correct order
- Ignored RouterGroup in controllerUrlMap
2015-10-11 11:35:56 +02:00
Simon Sessingø 3c3dcdf8df [FEATURE] Added getIdentifier method to RouterBase
- Fixed getter for getLoadedRoute
2015-10-11 10:43:35 +02:00
Simon Sessingø 2ff88f9ed4 [BUGFIX] Bugfixes 2015-10-07 00:14:59 +02:00
Simon Sessingø cbe1af0ab9 [FEATURE] Added ressource controller type 2015-10-06 19:46:07 +02:00
Simon Sessingø 6354c3c766 [TASK] Bugfixes and improvements
- Most routes now works along with getRoute() method.
2015-10-06 16:08:42 +02:00
Simon Sessingø 1c765476b5 [BUGFIXES] Bugfixes 2015-09-25 00:00:29 +02:00
Simon Sessingø 67c3479a3e [FEATURE]
- Added RouterController class.
- Added Router::controller functionality to SimpleRouter class.
- Bugfixes and optimisations.
2015-09-22 13:39:17 +02:00
Simon Sessingø 85470bbbd7 [TASK] Updated 2015-09-21 19:40:14 +02:00