zendframework/zf2 — pull request #1962 by Thinkscape (2012-07-23 18:12:41+00:00)
Title: Make request params retrieval more user-friendly

This PR complements the following request param style:
````php
$this->getRequest()->getPost()->get('foo');
$this->getRequest()->getQuery()->get('bar');
$this->getRequest()->getHeaders()->get('accept');
````

... with an alternative, simpler and more commonly found syntax:
````php
$this->getRequest()->getPost('foo');
$this->getRequest()->getQuery('bar');
$this->getRequest()->getHeaders('accept');
````
It also supports default values for all containers
````php
$this->getRequest()->getPost('foo','a default value');
$this->getRequest()->getQuery('limit', 10);
$this->getRequest()->getHeader('accept', new GenericHeader('accept','text/json');
````