Guillaume Oriol wrote:
> Hi,
> 
> The Zend_Controller_Request_Http class merges all request parameters (those
> from the path and those from the query part) into one unique set. I guess
> this was done on purpose because of the parameters written in the path.
> 
> But sometimes, it would be useful to get only query parameters (after the
> "?") of a GET request. Why can't I find a method in that class to get them?
> (Such a method would probably be a thin enveloppe arout $_GET.)

The Zend_Controller_Request_Http class (this is probably the request
class you're using) defines getPost($key, $default = null) and
getQuery($key, $default = null) methods that are probably what you're after.

From Controller:
$this->_request->getQuery('test');

-- 

Brenton Alker
PHP Developer - Brisbane, Australia

http://blog.tekerson.com/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to