i have added this zf2 route config to the standard skeleton application:

        'test' => array(
                'type'    => 'literal',
                'options' => array(
                    'route'    => '/test',
                    'defaults' => array(
                           'controller' => 'Application\Controller\Index',
                           'action'     => 'test',
                    ),
                ),
                'may_terminate' => true,
                'child_routes'  => array(
                    'query' => array(
                        'type' => 'Query',
                        'options' => array(
                            'defaults' => array(
                                'testparam' => 'bar'
                            ),
                        ),
                    ),
                ),    
        ),

in the controller i want to do get the request parameters within the
testAction:

    $this->params()->fromQuery();
    $this->getRequest()->getQuery();
    $this->getEvent()->getRouteMatch()->getParams();

neither of these works i only receive NULL values with this URL:
/test?testparam=testvalue

if i make this request it works: /?xxx=xycvxcv

(but i need to get the params from within the testAction())




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/zf2-zend-routing-get-request-parameters-with-this-params-fromQuery-not-working-tp4659473.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to