Request Interface Reference

Detailed Description

Request holds the request values that are used as input to Controller instances.

It is typically instantiated and filled by the ActionMapper.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 20 of file Request.php.

+ Inheritance diagram for Request:

Public Member Functions

 initialize ($controller=null, $context=null, $action=null)
 
 getMethod ()
 
 setResponseFormat ($format)
 
 getResponseFormat ()
 
- Public Member Functions inherited from ControllerMessage
 setSender ($sender)
 
 getSender ()
 
 setContext ($context)
 
 getContext ()
 
 setAction ($action)
 
 getAction ()
 
 setFormat ($format)
 
 getFormat ()
 
 setHeader ($name, $value)
 
 setHeaders (array $headers)
 
 getHeader ($name, $default=null)
 
 getHeaders ()
 
 clearHeader ($name)
 
 clearHeaders ()
 
 hasHeader ($name)
 
 setValue ($name, $value)
 
 setValues (array $values)
 
 getValue ($name, $default=null, $filter=null, $options=null)
 
 getBooleanValue ($name, $default=false)
 
 getValues ()
 
 clearValue ($name)
 
 clearValues ()
 
 hasValue ($name)
 
 setProperty ($name, $value)
 
 getProperty ($name)
 
 addError (ApplicationError $error)
 
 setErrors (array $errors)
 
 getErrors ()
 
 clearErrors ()
 
 hasErrors ()
 

Member Function Documentation

initialize (   $controller = null,
  $context = null,
  $action = null 
)

Initialize the request instance from the HTTP request.

Parameters
$controllerThe controller to call if none is given in request parameters (optional)
$contextThe context to set if none is given in request parameters (optional)
$actionThe action to perform if none is given in request parameters (optional)

Implemented in DefaultRequest.

getMethod ( )

Get the HTTP method of the request.

Returns
String

Implemented in DefaultRequest.

setResponseFormat (   $format)

Set the desired response format.

Parameters
$formatA key of the configuration section 'Formats'

Implemented in DefaultRequest.

getResponseFormat ( )

Get the message response format.

If no explicit format is set, the format is derived from the Content-Type header value, if existing. If no format can be derived, the first format in the configuration key 'Formats' will be used.

Returns
String

Implemented in DefaultRequest.