Created
July 19, 2012 15:55
-
-
Save japaveh/3144885 to your computer and use it in GitHub Desktop.
Example of the new ZF2 router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'router' => array( | |
'routes' => array( | |
'equipment' => array( | |
'type' => 'Segment', | |
'options' => array( | |
'route' => '/equipment[/:action[/equipment-:id]].html', | |
'constraints' => array( | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
'id' => '[0-9_-]*', | |
), | |
'defaults' => array( | |
'controller' => 'index', | |
'action' => 'index', | |
), | |
), | |
), | |
'module' => array( | |
'type' => 'Segment', | |
'options' => array( | |
'route' => '/equipment/module[/:action]', | |
'constraints' => array( | |
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
), | |
'defaults' => array( | |
'controller' => 'index', | |
'action' => 'index', | |
), | |
), | |
), | |
), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment