私はZend Framework 1を経験しており、そのフレームワークでいくつかのアプリケーションを構築しました。ZF2:コントローラのURLパラメータを取得
今、私はZend Framework 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',
),
),
),
),
),
),
。 この変数にはどのようにアクセスできますか? hereから
アーカイブの目的のために:ここで非常に完全な答えhttp:// stackoverflo w.com/questions/12077126/how-to-access-route-post-get-etc-parameters-in-zend-framework-2 – leticia