How to get $ _GET object from zend frame

So, suppose I have a url:

http: // url? x = 1 & y = 2

Then I can just get all get parameters through PHP using the $ _GET variable

therefore print_r ($ _ GET) will display all get variables

Now suppose I use the zend framework, and I'm trying to use the / var / value / var / value function:

so now my url

http: // url / controller / action / x / 1 / y / 2

I know how to get the values ​​for individual parameters x and y:

$this->request =  $this->getRequest();
$x = $this->request->getParam('x');

But suppose that if I want to get all the GET parameters in the same way as using the $ _GET object without a Zend frame, so I don’t need to access the variable separately ... how to do this within the framework using this newly formatted URL?

+3
1

$_GET, $request- > getQuery()

(, getParam(), $request- > getParams()

+7

Source: https://habr.com/ru/post/1756071/


All Articles