Skip to content

Instantly share code, notes, and snippets.

@DASPRiD
Created April 17, 2012 09:05
Show Gist options
  • Save DASPRiD/2404743 to your computer and use it in GitHub Desktop.
Save DASPRiD/2404743 to your computer and use it in GitHub Desktop.
<?php
$routeStackDi = array(
'parameters' => array(
'routes' => array(
'language' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '[/:language]',
'constraints' => array(
'language' => '[a-z]{2}'
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'language' => 'en'
)
),
'child_routes' => array(
'default' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '[/:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'Application\Controller\IndexController',
'action' => 'index',
),
),
),
),
),
),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment