PHP-Router
PHP-Router copied to clipboard
Simple PHP Router class (supports REST and reverse routing)
- [x] Add unit tests - [ ] Document the functionality /cc @antoine-pous I need review on it, *but do not merge yet*. Thanks in advance
* PHPRouter version: @dev-master * PHP version: * Exact steps to cause this issue 1. Create abstraction of router. 2. Create controllers with customs params and at first the id,...
PHP 5.5+ requires the hyphen to be escaped or moved to the end of the list to match it as a literal hyphen
It is a very simple and naive implementation actually not PSR-15 compliant, but maybe it is a good start for PSR-15 compliance. The idea is to set a callback before...
* PHPRouter version: 1.2.0-alpha * PHP version: PHP 7.1: * Exact steps to cause this issue 1. I configured RouteCollection 2. I run method matchCurrentRequest on Router * What you...
Allow filters like these - :id - :hash
I want to submit a nice request ( i think ) For now in methods we have: GET POST etc... i want to be added one more "XHR" or "Ajax"...
I think it would be cool to attach routes to basePath like that: ```PHP $latestApiVersion = 3; $collection = new RouteCollection(); // Out of basePath callback, implicit '/' $collection->attachRoute(new Route('/home',...
DI
Hey, nice router. But it would be nice if it'll have and mechanism to inject some dependencies in controller\action.