Getting $_GET parameters from route in Zend Framework 2

后端 未结 3 2183
失恋的感觉
失恋的感觉 2021-02-09 04:45

Zend Framework 1 had a very simple way of parsing URL routes and setting found params in the $_GET superglobal for easy access. Sure, you could use ->getParam($something) inside

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-09 05:41

    You could use in your controlller:

     $paramValue = $this->params()->fromQuery('your_param_here');
    

    Regards

提交回复
热议问题