2017 © Pedro Peláez
 

library router

A versatile router for PHP

image

jasny/router

A versatile router for PHP

  • Thursday, June 8, 2017
  • by jasny
  • Repository
  • 0 Watchers
  • 2 Stars
  • 3,616 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 2 Forks
  • 0 Open issues
  • 22 Versions
  • 10 % Grown

The README.md

Jasny Router

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight Packagist Stable Version Packagist License, (*1)

Jasny Router is a versatile PSR-7 compatible router. It decouples the way to determine a route, from the routing and from running the routed action. The router supports double pass middleware., (*2)

Installation

The Jasny Router package is available on packagist. Install it using composer:, (*3)

composer require jasny/router

Basic Usage

use Jasny\Router;
use Jasny\Router\Routes\Glob as Routes;
use Jasny\HttpMessage\ServerRequest;
use Jasny\HttpMessage\Response;

$routes = new Routes([
    '/' => function($request, $response) {
        $response->getBody()->write('Hello world');
        return $response;
    },
]);

$router = new Router($routes);
$router->handle(new ServerRequest()->withGlobalEnvironment(), new Response());

Routes

When creating a Router, you need to pass a object that implements the RoutesInterface. Routes should be seen as a collection of routes, with the ability to select one of those routes based on the server request., (*4)

The Versions

08/06 2017

dev-master

9999999-dev

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

28/02 2017

v1.1.2

1.1.2.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

30/01 2017

v1.1.1

1.1.1.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

24/01 2017

v1.1.0

1.1.0.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

02/12 2016

v1.0.5

1.0.5.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

02/12 2016

dev-errorpage

dev-errorpage

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

v1.0.4

1.0.4.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-strict-controller-class

dev-strict-controller-class

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

v1.0.3

1.0.3.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-controller-runner-namespace

dev-controller-runner-namespace

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-determine-route-middleware

dev-determine-route-middleware

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-glob-stdclass-routes

dev-glob-stdclass-routes

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-controller-runner-notfound

dev-controller-runner-notfound

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

29/11 2016

dev-middleware-path

dev-middleware-path

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

22/11 2016

v1.0.2

1.0.2.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

22/11 2016

v1.0.1

1.0.1.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

03/11 2016

v1.0.0

1.0.0.0

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

03/11 2016

dev-docs

dev-docs

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

03/11 2016

dev-fix-tests

dev-fix-tests

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

20/10 2016

dev-router-cleanup

dev-router-cleanup

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

13/10 2016

dev-glob-tests

dev-glob-tests

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router

11/10 2016

dev-runner

dev-runner

A versatile router for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

mvc routing router