Created
November 25, 2012 11:06
-
-
Save outman/4143133 to your computer and use it in GitHub Desktop.
ZendFramework2 route for new module by segment
This file contains hidden or 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
return array( | |
'controllers' => array( | |
'invokables' => array( | |
'Admin\Controller\Index' => 'Admin\Controller\IndexController', | |
'Admin\Controller\Dash' => 'Admin\Controller\DashController', | |
), | |
), | |
'router' => array( | |
'routes' => array( | |
'admin' => array( | |
'type' => 'segment', | |
'options' => array( | |
'route' => '/admin[/:controller][/:action][/]', | |
'constraints' => array( | |
'controller' => '[a-zA-Z][a-zA-Z0-9_-]+', | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]+', | |
), | |
'defaults' => array( | |
'__NAMESPACE__' => 'Admin\Controller', | |
'controller' => 'Index', | |
'action' => 'index' | |
), | |
), | |
), | |
), | |
), | |
'view_manager' => array( | |
'template_path_stack' => array( | |
'admin' => __DIR__ . '/../view/', | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment