The request object is a simple value object that is passed between
Zend_Controller_Front and the router, dispatcher, and
controller classes. It packages the names of the requested module,
controller, action, and optional parameters, as well as the rest of
the request environment, be it HTTP, the CLI, or
PHP-GTK.
The module name is accessed by
getModuleName()andsetModuleName().The controller name is accessed by
getControllerName()andsetControllerName().The name of the action to call within that controller is accessed by
getActionName()andsetActionName().Parameters to be accessible by the action are an associative array of key and value pairs that are retrieved by
getParams()and set withsetParams(), or individually bygetParam()andsetParam().
Based on the type of request, there may be more methods available.
The default request used, Zend_Controller_Request_Http,
for instance, has methods for retrieving the request URI, path
information, $_GET and $_POST parameters,
etc.
The request object is passed to the front controller, or if none is provided, it is instantiated at the beginning of the dispatch process, before routing occurs. It is passed through to every object in the dispatch chain.
Additionally, the request object is particularly useful in testing. The developer may craft the request environment, including module, controller, action, parameters, URI, etc, and pass the request object to the front controller to test application flow. When paired with the response object, elaborate and precise unit testing of MVC applications becomes possible.




