Skip to content

Instantly share code, notes, and snippets.

@towr
Created August 26, 2014 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save towr/74ed658e7bb64b67c950 to your computer and use it in GitHub Desktop.
Save towr/74ed658e7bb64b67c950 to your computer and use it in GitHub Desktop.
'home' => array(
'type' => 'Base\Router\Http\SkippableSegment',
'may_terminate' => true,
'options' => array(
'route' => '/[:lang/]',
'constraints' => array(
'lang' => 'en|fr'
),
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
'lang' => ''
),
'skippable' => array(
'lang' => true
)
),
'child_routes' => array(
'page-one' => array(
'type' => 'Segment',
'may_terminate' => true,
'options' => array(
'route' => 'page-one',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'page-one',
),
),
),
'page-two' => array(
'type' => 'Segment',
'may_terminate' => true,
'options' => array(
'route' => 'page-two',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'page-two',
),
),
'child_routes' => array(
'search' => array(
'type' => 'Literal',
'options' => array(
'route' => '/search',
),
),
),
),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment