J'utilise zf2 et j'ai défini des routes enfants comme celle-ci.La route enfant Zf2 ne fonctionne pas lorsqu'elle a un enfant de plus.
'routes' => array(
'test' => array(
'type' => 'Literal',
'options' => array(
'route' => '/test',
'defaults' => array(
'__NAMESPACE__' => 'Test\Controller',
'controller' => 'Test',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'testABC' => array(
'type' => 'Literal',
'options' => array(
'route' => '/abc',
'defaults' => array(
'action' => 'abc',
),
),
'child_routes' => array(
'testABCDEF' => array(
'type' => 'Segment',
'options' => array(
'route' => '/def/:id',
'defaults' => array(
'action' => 'def',
),
),
),
'testABCXYZ' => array(
'type' => 'Segment',
'options' => array(
'route' => '/xyz/:id',
'defaults' => array(
'action' => 'xyz',
),
),
),
),
),
),
),
),
Dans ce seul chemin ne fonctionne pas, je ne sais pas pourquoi?
- localhost/test travail
- localhost/test/abc travail non
- localhost/test/abc/def/1 travail
- localhost/test/abc/xyz/1 Fonctionnement
grâce a beaucoup ... maintenant son fonctionnement..Maintenant je suis venu à savoir quelle est l'utilisation 'may_terminate'. – user3542450