request/AgaviRequest.class.php

Show: inherited
Table of Contents

\AgaviRequest

Package: agavi\request

AgaviRequest provides methods for manipulating client request information such as attributes, errors and parameters. It is also possible to manipulate the request method originally sent by the user.

Parent(s)
\AgaviAttributeHolder < \AgaviParameterHolder
Children
\AgaviWebserviceRequest
\AgaviConsoleRequest
\AgaviWebRequest
Author
Sean Kerr  
Copyright
Authors  
Copyright
The Agavi Project  
Since
0.9.0  
Version
$Id: AgaviRequest.class.php 4667 2011-05-20 12:34:58Z david $  

Properties

Propertyprotectedarray  $attributes= 'array()'

An associative array of attributes
Default valuearray()Details
Type
array
Propertyprotected\AgaviContext  $context= 'null'

An AgaviContext instance.
Default valuenullDetails
Type
\AgaviContext
Propertyprotectedarray  $errors= 'array()'

An associative array of errors
Default valuearray()Details
Type
array
Propertyprivatestring  $key= 'null'

The key used to lock the request, or null if no lock set
Default valuenullDetails
Type
string
Propertyprotectedstring  $method= 'null'

The request method name
Default valuenullDetails
Type
string
Propertyprivate\AgaviRequestDataHolder  $requestData= 'null'

The request data holder instance.
Default valuenullDetails
Type
\AgaviRequestDataHolder

Methods

methodpublic__construct( ) : void

Constructor.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetContext( ) : \AgaviContext
final

Retrieve the current application context.

Returns
Type Description
\AgaviContext An AgaviContext instance.
Details
Author
David Zülke  
Since
0.11.0  
methodpublicgetMethod( ) : string

Retrieve this requests method.

Returns
Type Description
string The request method name
Details
Author
Sean Kerr  
Author
David Zülke  
Since
0.9.0  
methodpublicgetRequestData( ) : \AgaviRequestDataHolder
final

Get the data holder instance of this request.

Returns
Type Description
\AgaviRequestDataHolder The request data holder.
Details
Author
David Zülke  
Author
Dominik del Bondio  
Since
0.11.0  
methodpublicgetSourceValue( mixed $keys, mixed $default = null ) : void
static

Get a value by trying to find the given key in $_SERVER first, then in $_ENV. If nothing was found, return the key, or the given default value.

Parameters
Name Type Description
$keys mixed

The key (or an array of keys) of the value to fetch.

$default mixed

A default return value, or null if the key should be returned (static return values can be defined this way).

Details
Author
David Zülke  
Since
0.11.0  
methodpublicinitialize( \AgaviContext $context, array $parameters = array() ) : void

Initialize this Request.

Parameters
Name Type Description
$context \AgaviContext

An AgaviContext instance.

$parameters array

An associative array of initialization parameters.

Throws
Exception Description
\<b>AgaviInitializationException</b> If an error occurs while initializing this Request.
Details
Author
David Zülke  
Since
0.9.0  
methodpublicisLocked( ) : void
final

Whether or not the Request is locked.

Details
Author
David Zülke  
Since
0.11.0  
methodpublicsetMethod( string $method ) : void

Set the request method.

Parameters
Name Type Description
$method string

The request method name.

Details
Author
Sean Kerr  
Author
David Zülke  
Since
0.9.0  
methodprotectedsetRequestData( \AgaviRequestDataHolder $rd ) : void
final

Set the data holder instance of this request.

Parameters
Name Type Description
$rd \AgaviRequestDataHolder

The request data holder.

Details
Author
David Zülke  
Author
Dominik del Bondio  
Since
0.11.0  
methodpublicshutdown( ) : void

Execute the shutdown procedure.

Details
Author
Sean Kerr  
Since
0.9.0  
methodpublicstartup( ) : void

Do any necessary startup work after initialization.

This method is not called directly after initialize().

Details
Author
David Zülke  
Since
0.11.0  
methodpublictoggleLock( string $key = null ) : mixed
final

Lock or unlock the Request so request data can(not) be fetched anymore.

Parameters
Name Type Description
$key string

The key to unlock, if the lock should be removed, or null if the lock should be set.

Returns
Type Description
mixed The key, if a lock was set, or a boolean value indicating whether or not the unlocking was successful.
Details
Author
David Zülke  
Since
0.11.0  
Documentation was generated by DocBlox 0.17.2.