If you know the parameter name, then you are right. But I was looking for a
method to get the complete array of query parameters.
After reading your answer, I looked into ZF code and discovered the method
would return the array I was looking for when no parameter was given.

So, thank you for your help.


Brenton Alker-3 wrote:
> 
> 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/
> 
> 
>  
> 


-----
Guillaume ORIOL
Sofware architect
Technema
-- 
View this message in context: 
http://www.nabble.com/how-to-isolate-%24_GET-or-%24_POST-params-from-the-rest-of-request-tp23666181p23670265.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to