在ZF2中使用子路由时,该方法的名称应该是什么?
/帐户/管理/创建
/帐户/用户/创建
两者都会在帐户控制器内解析createAction,但他们不应该解析为createAdminAction和createUserAction吗?我是否正确使用儿童路线?
'application' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller][/:action][/:userId]',
'defaults' => array(
'__NAMESPACE__' => 'application\Controller',
'controller' => 'Index',
'action' => 'index',
),
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'userId' => '[0-9]*'
),
),
'may_terminate' => true,
'child_routes' => array(
'application' => array(
'type' => 'Segment',
'options' => array(
'route' => '[:action[/]]',
'constraints' => array(
'action' => '[0-9]'
)
)
)
)
)