https://github.com/drmvc/router
Simple router based on PSR-7 HTTP Message recommendation
https://github.com/drmvc/router
psr-7 router
Last synced: about 2 months ago
JSON representation
Simple router based on PSR-7 HTTP Message recommendation
- Host: GitHub
- URL: https://github.com/drmvc/router
- Owner: drmvc
- License: mit
- Created: 2018-03-27T21:57:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T19:44:11.000Z (about 7 years ago)
- Last Synced: 2025-02-13T14:40:50.732Z (2 months ago)
- Topics: psr-7, router
- Language: PHP
- Homepage: https://drmvc.com/
- Size: 75.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/drmvc/router)
[](https://travis-ci.org/drmvc/router)
[](https://packagist.org/packages/drmvc/router)
[](https://packagist.org/packages/drmvc/router)
[](https://travis-ci.org/drmvc/router)
[](https://codeclimate.com/github/drmvc/router)
[](https://scrutinizer-ci.com/g/drmvc/router/)# DrMVC\Router
Simple router based on PSR-7 HTTP Message recommendation.
composer require drmvc/router
## How to use
More examples you can find [here](extra).
```php
get('/aaa//', DrMVC\Controllers\Index::class)
->get('/bbb/zzz/ccc', 'App\Controllers\Index:default')
->get(
'/action/zzz',
function() {
echo "action\n";
}
);$route = $router->getRoute();
print_r($route);
```## About PHP Unit Tests
First need to install all dev dependencies via `composer update`, then
you can run tests by hands from source directory via `./vendor/bin/phpunit` command.# Links
* [DrMVC Framework](https://drmvc.com)