Skip to content

Instantly share code, notes, and snippets.

@matej21
Created February 7, 2015 00:29
Show Gist options
  • Save matej21/f4ed3f05ad622d6e8366 to your computer and use it in GitHub Desktop.
Save matej21/f4ed3f05ad622d6e8366 to your computer and use it in GitHub Desktop.
<?php
class RouterFactory
{
public /* static */ function createRouter()
{
$router = new Nette\Application\Routers\RouteList();
$router[] = $adminRouter = new Nette\Application\Routers\RouteList("Admin");
$adminRouter[] = new Nette\Application\Route("admin/<presenter>/<action>", "Dashboard:default");
$router[] = $frontRouter = new Nette\Application\Routers\RouteList("Front");
$frontRouter[] = new Nette\Application\Route("<presenter>/<action>", "Homepage:default");
return $router;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment