Zend Framework

Allow specifying default return values for HTTP request superglobal accessors

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 0.2.0
  • Fix Version/s: 0.6.0
  • Component/s: Zend_Controller
  • Labels:
    None

Description

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

public function getQuery($key = null, $default = null)
{
    if (null === $key) {
        return $_GET;
    }
    return (isset($_GET[$key])) ? $_GET[$key] : $default;
}

Activity

Hide
Matthew Weier O'Phinney added a comment -

Done in revision 2116.

Show
Matthew Weier O'Phinney added a comment - Done in revision 2116.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: