Jiew Meng Jiew Meng - 4 months ago 13x
PHP Question

Zend Framework: Can i just get GET params?

In Zend Framework, most of the time to get a param, i will use

// from controller

but how can i get just GET params using the 'Zend' way? Or do i just use
? Is there any difference between





Use getQuery():


Other methods available include

  • getParam()
  • getQuery()
  • getPost()
  • getCookie()
  • getServer()
  • getEnv()

getParam() checks user params first, then $_GET, and then $_POST, returning the first match found or null.

Try to avoid accessing the superglobals directly.