2017 © Pedro Peláez
 

library rerouter

Advanced routing on top of FastRoute

image

vlakarados/rerouter

Advanced routing on top of FastRoute

  • Monday, May 11, 2015
  • by vlakarados
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ReRouter

Description

ReRoute is a router allowing you to tie different actions to corresponding URL's, it's built over and complements the fantastic FastRoute - a blazing fast router. What differs ReRoute from others is the clean structure of your route definitions as well as some other features (see below)., (*1)

Setting up ReRoute is a piece of cake, see docs below as well as the example application., (*2)

Really early alpha - unstable, unsecure, just as the one you'd like to use, have fun!, (*3)

Features

Route groups

  • Share settings across routes
  • Prefix patterns of routes in group

Route patterns

  • Readable route pattern arguments: /user/{userId:numeric}/profile or /user/{username:alpha}
  • alpha instead of [a-zA-Z]+.
  • numeric instead of [0-9]+.
  • alphanumeric instead of [a-zA-Z0-9]+.
  • any instead of [a-zA-Z0-9$-_.+!*\'(),]+.
  • Create and register your own pattern.

Named routes

  • Routes can be named, then matched.
  • URL can be built from a named route.

Middleware

  • Add optional middleware to any route or route group or the whole application.
  • Define as many types of middleware as you want and run it anywhere in your app by calling the middleware.

Filters

Using ReRouter

See example.php, (*4)

Installation

The Versions

11/05 2015

dev-master

9999999-dev

Advanced routing on top of FastRoute

  Sources   Download

The Requires