Zend Framework 1을 경험했으며 그 프레임 워크를 사용하여 일부 응용 프로그램을 빌드했습니다.ZF2 : 컨트롤러에서 URL 매개 변수 가져 오기
이제 젠드 프레임 워크 2를 실험하고 있지만 URL 매개 변수에 머물러 있습니다. 내 라우팅과 같은 설정을했습니다 : 당신이 볼 수 있듯이, 나는 변수 슬러그를 만들기 위해 노력했습니다
// Setup for router and routes
'Zend\Mvc\Router\RouteStack' => array(
'parameters' => array(
'routes' => array(
'default' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/[:slug]',
'constraints' => array(
'slug' => '[a-zA-Z][a-zA-Z0-9_\/-]*'
),
'defaults' => array(
'controller' => 'Htmlsite\Controller\BootController',
'action' => 'index',
'slug' => 'home'
),
),
),
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Htmlsite\Controller\BootController',
'action' => 'index',
),
),
),
),
),
),
. 이 변수에 액세스하려면 어떻게해야합니까?
아카이브 목적을 위해 : 여기 http : // stackoverflo에 대한 완전한 대답 w.com/questions/12077126/how-to-access-route-post-get-etc-parameters-in-zend-framework-2 – leticia