zendframework/zf2 — pull request #902 by zucchi (2012-03-07 22:00:10+00:00)
Title: Zucchi/router tweaks

Added new querystring route to allow appending of query strings

// Setup the router and routes
'Zend\Mvc\Router\RouteStack' => array(
'parameters' => array(
'routes' => array(
'hyperion' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/hyperion[/:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'hyperion',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'query' => array(
'type' => 'Zend\Mvc\Router\Http\QueryString',
),
),
),
),
),
),

which will now add params as a query string. to a url.

url('hyperion/query', array('controller'=>'domains', 'action' => 'detail', 'id' => $domain->id));?>