0
무엇 메신저 달성하기 위해 노력 :ZF2 세그먼트 자식 경로
그래서domain.com/user = UserController::index
domain.com/user/profile = UserController::profile
domain.com/user/profile/9 = UserController::profile (with query param id=9)
domain.com/user/profile/9/edit = UserController::editProfile (with query param id=9)
나는 다음과 같은 경로가 : 그것은 일종의 사실을 제외하고, 작동
'user' => array(
'type' => 'Segment',
'options' => array(
'route' => '/user',
'defaults' => array(
'__NAMESPACE__' => 'YrmUser\Controller',
'controller' => 'User',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'profile' => array(
'type' => 'Segment',
'options' => array(
'route' => '/profile[/:id]',
'defaults' => array(
'action' => 'profile',
),
'constraints' => array(
'id' => '[0-9]*'
),
),
'may_terminate' => true,
'child_routes' => array(
'edit' => array(
'type' => 'Segment',
'options' => array(
'route' => '/edit',
'defaults' => array(
'action' => 'editProfile',
),
),
'may_terminate' => true
),
)
),
)
)
을 그 쿼리 매개 변수 ID 결코 가치를 얻는다. 내가 메신저 바보 간단하게 그 일을 추측, 잘못된 뭘하는지 말해 줄 수 누구 ... 사전에
감사합니다,
YRM 나를 위해
는 참이었다 – YRM