Skip to content

Instantly share code, notes, and snippets.

@amcsi
Created October 22, 2014 15:52
Show Gist options
  • Save amcsi/725194aee954efe4d48a to your computer and use it in GitHub Desktop.
Save amcsi/725194aee954efe4d48a to your computer and use it in GitHub Desktop.
ZF2 routes - merging route names
<?php
return array(
'router' => array(
'router_class' => 'Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack',
'routes' => array(
'base' => array(
'type' => 'Literal',
'options' => array(
'route' => '/base',
'defaults' => array(
'__NAMESPACE__' => 'Banana\Controller',
),
),
'may_terminate' => true,
'child_routes' => array(
'damage' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/damage',
),
),
'cover' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/cover',
),
),
'appointment' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/appointment',
),
),
'appointment.qualified' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/appointment/qualified',
),
),
'details' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/details',
),
),
'details.secondary' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/details/secondary',
),
),
'summary' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/summary',
),
),
'confirm' => array(
'type' => 'Banana\Route\TranslatableSimplified',
'options' => array(
'route' => '/confirm',
),
),
),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment