simple-php-router

Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.

Downloads
140.9K
Stars
646
Committers
13
simple-php-router - Version 1.7.3

Published by skipperbent over 8 years ago

  • Fixed getIp in HttpRequest class sometimes not picking up local-ip.
  • Fixed get-parameters as array (param[id]=value) causing array-to-string notice.
  • Made setDefaultNamespace method in RouterBase chainable.
  • Simplified SimpleRouter class.
  • Added Input classes from Pecee-framework to enable easy access of input-parameters from custom controllers.
  • Updated documentation to reflect new changes.
simple-php-router - Version 1.7.2.1

Published by skipperbent over 8 years ago

  • Moved group-middleware rendering to routeRequest method in RouterBase to ensure all router urls has been initialized.
  • Optimisations.
simple-php-router - Version 1.7.1

Published by skipperbent over 8 years ago

Changelog

  • Added minimum requirements (issue: #80, thanks @MarcinOrlowski)
  • Fixed problem with nested group not merging prefix correctly (issue: #83, thanks @MarcinOrlowski)
  • Added ExceptionHandling functionality which somehow never got implemented correctly and/or got lost somewhere in between (see notes blow for more information).
  • CSRF-token is no longer initiated by RouterBase and is therefore not enabled by default. Please read notes section below for more information.
  • Group middlewares are now loaded on each page-load if prefix is set and matches the current route.
  • Added some basic unit tests (more to come).
  • Optimized CSRF-token management.
  • Optimized code and removed unused references.
  • Updated documentation with list of sites that uses project in production.
  • Squashed bugs.

Notes

CSRF-security

CSRF-token are no longer initiated by RouterBase. That means that the router will have no CSRF security enabled by default. To add this functionality, please add this line to your custom router-class or routes.php file:

SimpleRouter::csrfVerifier(new \Pecee\Http\Middleware\BaseCsrfVerifier());

Custom Exception handling

You can use custom exception handling like shown in the documentation. You classes need to implement the IExceptionHandler interface.

simple-php-router - Version 1.6.5

Published by skipperbent over 8 years ago

  • 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.
simple-php-router - Version 1.6.4

Published by skipperbent over 8 years ago

  • Fixed nested groups not merging settings to routes.
  • Added support for multiple aliases using array.
simple-php-router - Version 1.6.3

Published by skipperbent over 8 years ago

  • Added rewrite_uri parameter to Request class.
  • Bugfixes.
simple-php-router - Version 1.6.2

Published by skipperbent over 8 years ago

  • Readded rendering of groups.
simple-php-router - Version 1.6.1

Published by skipperbent over 8 years ago

  • Optimisations + bugfixes.
simple-php-router - Version 1.6.0

Published by skipperbent over 8 years ago

  • Added custom boot-manager support to allow rules to be manipulated through database, file etc. Please see documentation for further information.
  • Moved RouterException to Exception namespace.
  • Optimisations and cleanup.
simple-php-router - Version 1.5.8

Published by skipperbent over 8 years ago

  • Settings on individual routes in a group, now have higher priority than the ones inherited by the group (if any).
simple-php-router - Version 1.5.7

Published by skipperbent over 8 years ago

  • Fixed: callback in groups are no longer rendered if domain and/or prefix doesn't match the current route.
simple-php-router - Version 1.5.6

Published by skipperbent over 8 years ago

  • Added support for HTTP_X_FORWARDED_PROTO http header in isSecure method.
simple-php-router - Version 1.5.5

Published by skipperbent over 8 years ago

  • Added httpCode parameter to redirect method in Response class.
simple-php-router - Version 1.5.4

Published by skipperbent over 8 years ago

  • Added urldecode to RouterRessource, RouterRoute and RouterController classes to ensure that urls with special letters (for example danish characters like: æ, ø, å) can be picked up by a custom regular expression (match parameter).
simple-php-router - Version 1.5.3

Published by skipperbent almost 9 years ago

  • Fixed regex causing optional parameters to sometimes catch required parameters value.
simple-php-router - Version 1.5.2

Published by skipperbent almost 9 years ago

  • Fixed minor errors with optional parameter when using getRoute().
simple-php-router - Version 1.5.1

Published by skipperbent almost 9 years ago

  • Ensured action parameter was set before using it in RouterResource class.
simple-php-router - Version 1.5.0

Published by skipperbent almost 9 years ago

  • Added option to change route and get information about current route through the Request object.
  • Moved loadedRoute to Request class so it can be easily overwritten from middleware.
  • Updated documentation to relfect new changes.
simple-php-router - Version 1.4.9

Published by skipperbent almost 9 years ago

  • Parameters matching optimisations (it's now less greedy).
simple-php-router - Version 1.4.8

Published by skipperbent almost 9 years ago

  • Enchanched regular expression for optinal parameters to completely ignore path seperators (/).