2017 © Pedro Peláez
 

library simplisticrouter

The simplest of routers, just what I needed.

image

zegnat/simplisticrouter

The simplest of routers, just what I needed.

  • Saturday, December 16, 2017
  • by Zegnat
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

SimplisticRouter

The simplest of routers, just what I needed. When everything else seems to offer more functions than I need for a minimum viable product., (*1)

For anything more than an MVP, I am a really big fan of FastRoute and projects like Route that make use of it., (*2)

Install

Via Composer, (*3)

``` bash $ composer require zegnat/simplistic-router, (*4)


## Usage ``` php $handlers = new \Yuloh\Container\Container(); $handlers->set('index', function () { return new \App\SomeIndexControllerPerhaps(); }); $handlers->set('404', function () { return new \App\My404Handler(); }); $routes = [ [ 'route' => '/', 'handler' => 'index', ], ]; $router = new \Zegnat\SimplisticRouter\SimplisticRouter($routes, '404', $handlers); $response = $router->handle($request);

License

The BSD Zero Clause License (0BSD). Please see the LICENSE file for more information., (*5)

The Versions

16/12 2017

dev-master

9999999-dev

The simplest of routers, just what I needed.

  Sources   Download

0BSD

The Requires

 

The Development Requires

by Martijn van der Ven

16/12 2017

dev-develop

dev-develop

The simplest of routers, just what I needed.

  Sources   Download

0BSD

The Requires

 

The Development Requires

by Martijn van der Ven