The router is responsible for the selection of controller
and action method.
Each router contains an array of routes.
Routes are objects of classes that implement the
ezcMvcRoute interface: ezcMvcRailsRoute,
ezcMvcRegexpRoute and ezcMvcCatchAllRoute.
Each route tests itself if it matches the request data, and
returns an ezcMvcRoutingInformation object if it matched.
<?php
return array(
new ezcMvcRailsRoute( '/', 'shareHomeController', 'list' ),
new ezcMvcRailsRoute( '/update/:id', 'shareHomeController', 'show' ),
new ezcMvcRailsRoute( '/view/:id',
'shareHomeController', 'show', array( 'id' => 1 ) ),
new ezcMvcRegexpRoute( '@^people(/((?P<nr>[0-9]+)|(?P<name>.+)))?$@',
'testController', 'action', array( 'nr' => '', 'name' => '' ),
new ezcMvcCatchAllRoute() );
?>