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 2.1.0

Published by skipperbent almost 8 years ago

  • Re-added missing methods from version 1.
simple-php-router - Version 2.1.9

Published by skipperbent almost 8 years ago

  • Updated documentation.
simple-php-router - Version 2.1.8

Published by skipperbent almost 8 years ago

  • Fixed ExceptionHandlers loading in reverse order.
  • Fixed rewrite when modifying Request not working properly.
simple-php-router - Version 2.1.7

Published by skipperbent almost 8 years ago

  • Added default null default parameter value to RouterController and RouterResource.
simple-php-router - Version 2.1.6

Published by skipperbent almost 8 years ago

  • Set parameters to null when new url is set
simple-php-router - Version 2.1.5

Published by skipperbent almost 8 years ago

  • Bugfixes
simple-php-router - Version 2.1.4

Published by skipperbent almost 8 years ago

  • Parameters are no longer automatically merged. Though this might increase the code-size a little when mapping the properties from the array, it was done with a performance decision in mind and to avoid calling isset each time a magic-property was called. Plus it should give a little more control over what data the properties actually contains.
  • Added SimpleRouter::patch and SimpleRouter::delete methods.
  • Added LoadableRoute abstract class. This class contains basic functionality used by loadable routes (RouterRoute, RouterController, RouterRessource etc).
  • Cleaned up RouterGroup and removed unused/old functionality.
  • Changed demo-project to use version-2 of router.
  • Bug fixes and optimisations.
simple-php-router - Version 2.1.3

Published by skipperbent almost 8 years ago

  • Bugfixes
simple-php-router - Version 2.1.2

Published by skipperbent almost 8 years ago

  • Fixed loadMiddleware method expecting RouterRoute instead of RouterEntry type.
  • Other small optimisation and bugfixes.
simple-php-router - Version 2.1.1

Published by skipperbent almost 8 years ago

  • CSRF-bugfixes
simple-php-router - Version 2.1.0

Published by skipperbent almost 8 years ago

  • Removed defaultNamespace variable from SimpleRouter::start() and moved it to separate static method called setDefaultNamespace($namespace).
  • IExceptionHandler interface now takes $route parameter as reference.
  • Added $route parameter to IMiddleware interface.
  • Added IControllerRoute and ILoadableRoute interfaces to easier group roues.
  • Fixed as not working when using alias in option array.
  • Major refactor of the Request class.
  • Refactored Route classes - removed magic-method to enhance speed (it does come at a cost of a little more code).
  • Added proper documentation for changing route (using fake route) and altering the callback and fixed some issues in regards to this.
  • Renamed setBaseCsrfVerifier and getBaseCsrfVerifier methods in RouterBase to getCsrfVerifier and setCsrfVerifier.
  • Changed self constants to static so they can be extended in the future.
  • Added nested groups and alias unit-tests.
  • Updated demo-project to reflect latest changes.
  • Updated documentation to reflect latest changes.
  • Optimisation enhancements and bugfixes.

Release notes

Please note that this is a somewhat big refactoring of simple-php-router. Please read the changelog carefully and use it in your development-environment - before deploying it in production, as there might be braking changes.

  1. If using custom namespace and/or Router - set your default namespace by calling the SimpleRouter::router()->setDefaultNamespace($namespace) method.
  2. Please update all classes implementing IExceptionHandler with new updated properties.
  3. Please update all classes implementing IMiddleware with new updated properties.
simple-php-router - Version 2.0.2

Published by skipperbent almost 8 years ago

  • Fixed: removed test-code from SimpleRouter constructor.
  • Updated documentation (simplified).
simple-php-router - Version 2.0.1

Published by skipperbent almost 8 years ago

  • all method in Input class now returns correct array.
  • all method in Input now supports json data.
  • Fixed group not adding multiple middlewares
  • Minor bugfixes.
simple-php-router - Version 1.8.0.8

Published by skipperbent almost 8 years ago

  • all method in Input class now returns correct array.
  • all method in Input class now supports json data.
  • Minor bugfixes.
simple-php-router - Version 2.0

Published by skipperbent almost 8 years ago

  • Isolated Http classes from router.
  • Removed getInstance from Request object - current router request should now be obtained through the SimpleRouter::request() method.
  • 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.
simple-php-router - Version 1.8.0.7

Published by skipperbent almost 8 years ago

  • Fixed RouterGroup not pushing multiple middlewares properly.
simple-php-router - Version 1.8.0.6

Published by skipperbent almost 8 years ago

  • Optimized group behavior
simple-php-router - Version 1.8.0.5

Published by skipperbent almost 8 years ago

  • Group only loads if prefix matches (and will always load if prefix is not defined).
simple-php-router - Version 1.8.0.4

Published by skipperbent almost 8 years ago

  • Added support for Cloudflare when using getIp method in Request.
  • Fixed undefined variable notice in RouterBase class.
simple-php-router - Version 1.8.0.3

Published by skipperbent almost 8 years ago

  • Fixed minor notice when using simple-php-router in cli context.