Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)