Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drmvc/router
Simple router based on PSR-7 HTTP Message recommendation
https://github.com/drmvc/router
psr-7 router
Last synced: 9 days 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T19:44:11.000Z (almost 7 years ago)
- Last Synced: 2024-12-14T08:27:48.912Z (about 1 month 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
[![Latest Stable Version](https://poser.pugx.org/drmvc/router/v/stable)](https://packagist.org/packages/drmvc/router)
[![Build Status](https://travis-ci.org/drmvc/router.svg?branch=master)](https://travis-ci.org/drmvc/router)
[![Total Downloads](https://poser.pugx.org/drmvc/router/downloads)](https://packagist.org/packages/drmvc/router)
[![License](https://poser.pugx.org/drmvc/router/license)](https://packagist.org/packages/drmvc/router)
[![PHP 7 ready](https://php7ready.timesplinter.ch/drmvc/router/master/badge.svg)](https://travis-ci.org/drmvc/router)
[![Code Climate](https://codeclimate.com/github/drmvc/router/badges/gpa.svg)](https://codeclimate.com/github/drmvc/router)
[![Scrutinizer CQ](https://scrutinizer-ci.com/g/drmvc/router/badges/quality-score.png?b=master)](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)