DefaultRequest Class Reference

Detailed Description

Default Request implementation.

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

Definition at line 27 of file DefaultRequest.php.

+ Inheritance diagram for DefaultRequest:

Public Member Functions

 __construct (Formatter $formatter)
 
 initialize ($controller=null, $context=null, $action=null)
 
 getMethod ()
 
 setResponseFormat ($format)
 
 getResponseFormat ()
 
 __toString ()
 
- Public Member Functions inherited from AbstractControllerMessage
 __construct (Formatter $formatter)
 
 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 ()
 
 __toString ()
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractControllerMessage
 getFormatter ()
 

Constructor & Destructor Documentation

__construct ( Formatter  $formatter)

Constructor.

Parameters
$formatter

Definition at line 45 of file DefaultRequest.php.

Member Function Documentation

initialize (   $controller = null,
  $context = null,
  $action = null 
)
See also
Request::initialize()

The method tries to match the current request path against the routes defined in the configuration section 'routes' and constructs the request based on these parameters. It then adds all data contained in $_GET, $_POST, $_FILES and php://input (raw data from the request body).

Examples for route definitions are:

GET/ = action=cms
GET,POST,PUT,DELETE/rest/{language}/{className} = action=restAction&collection=1
GET,POST,PUT,DELETE/rest/{language}/{className}/{id|[0-9]+} = action=restAction&collection=0

Implements Request.

Definition at line 76 of file DefaultRequest.php.

getMethod ( )
See also
Request::getMethod()

Implements Request.

Definition at line 174 of file DefaultRequest.php.

setResponseFormat (   $format)
See also
Request::setResponseFormat()

Implements Request.

Definition at line 181 of file DefaultRequest.php.

getResponseFormat ( )
See also
Request::getResponseFormat()

Implements Request.

Definition at line 188 of file DefaultRequest.php.

__toString ( )

Get a string representation of the message.

Returns
The string

Definition at line 199 of file DefaultRequest.php.