nextras/static-router

Simple static router for Nette Framework

v1.1.0 2016-06-19 21:56 UTC

README

Build Status Downloads this Month Stable version HHVM Status

Installation

Add to your composer.json:

"require": {
	"nextras/static-router": "~1.0"
}

Example

use Nextras\Routing\StaticRouter;

$router = new StaticRouter(['Homepage:default' => 'index.php'], StaticRouter::ONE_WAY);

$router = new StaticRouter([
	'Homepage:default' => '',
	'Auth:signIn' => 'sign-in',
	'Auth:signOut' => 'sign-out',
	'Auth:signUp' => 'sign-up',
]);