ZF-620: Allow specifying default return values for HTTP request superglobal accessors

Issue Type: Improvement Created: 2006-12-05T12:08:51.000+0000 Last Updated: 2007-07-05T14:43:32.000+0000 Status: Resolved Fix version(s): - 0.6.0 (16/Dec/06)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:


In Zend_Controller_Request_Http, allow the various get*() methods to return a specified default value:

<pre class="highlight">
public function getQuery($key = null, $default = null)
    if (null === $key) {
        return $_GET;
    return (isset($_GET[$key])) ? $_GET[$key] : $default;


Posted by Matthew Weier O'Phinney (matthew) on 2006-12-05T13:11:01.000+0000

Done in revision 2116.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.