Docs For Class Zend_Http_Request

## Class Zend_Http_Request

Description

Implements interfaces:

- Zend_Request_Interface

Zend_Http_Request

- usedby: Zend_Controller_Request_Http
- uses: Zend_Request_Interface

Located in /Zend/Http/Request.php (line 19)

Variable Summary
array $_aliases
string $_basePath
string $_baseUrl
array $_params
string $_pathInfo
string; $_requestUri
Method Summary
void __construct ([string|Zend_Uri $uri = null])
mixed get (string $key)
string|null getAlias (string $name)
array getAliases ()
string getBasePath ()
string getBaseUrl ()
mixed getCookie (string $key)
mixed getEnv (string $key)
string getMethod ()
mixed getParam (mixed $key)
array getParams ()
string getPathInfo ()
mixed getPost (string $key)
mixed getQuery (string $key)
string getRequestUri ()
mixed getServer (string $key)
boolean has (string $key)
boolean isPost ()
unknown set (string $key, mixed $value)
void setAlias (string $name, string $target)
void|false setBasePath ([string|null $basePath = null])
void|false setBaseUrl ([mixed $baseUrl = null])
void setParam (mixed $key, mixed $value)
void setParams ( $params)
void|false setPathInfo ([string|null $pathInfo = null])
void|false setRequestUri ([string $requestUri = null])
mixed __get (string $key)
boolean __isset (string $key)
void __set (string $key, mixed $value)
Variables
array $_aliases = array() (line 55)

Alias keys for request parameters

- access: protected

string $_basePath = '' (line 37)

Base path of request

- access: protected

string $_baseUrl = '' (line 31)

Base URL of request

- access: protected

array $_params = array() (line 49)

Instance parameters

- access: protected

string $_pathInfo = '' (line 43)

PATH_INFO

- access: protected

string; $_requestUri (line 25)

REQUEST_URI

- access: protected

Methods
Constructor __construct (line 66)

Constructor

If a $uri is passed, the object will attempt to populate itself using that information.

- access: public

void __construct ([string|Zend_Uri $uri = null])

- string|Zend_Uri $uri

get (line 123)

Alias to __get

- access: public

mixed get (string $key)

- string $key

getAlias (line 582)

Retrieve an alias

Retrieve the actual key represented by the alias $name.

- return: Returns null when no alias exists
- access: public

string|null getAlias (string $name)

- string $name

getAliases (line 596)

Retrieve the list of all aliases

- access: public

array getAliases ()
getBasePath (line 428)

Everything in REQUEST_URI before PATH_INFO not including the filename <img src="<?=$basePath?>/images/zend.png"/>

- access: public

string getBasePath ()
getBaseUrl (line 387)

Everything in REQUEST_URI before PATH_INFO <form action="<?=$baseUrl?>/news/submit" method="POST"/>

- access: public

string getBaseUrl ()
getCookie (line 223)

Retrieve a member of the $_COOKIE superglobal

- return: Returns null if key does not exist
- access: public
- todo: How to retrieve from nested arrays

mixed getCookie (string $key)

- string $key

getEnv (line 245)

Retrieve a member of the $_ENV superglobal

- return: Returns null if key does not exist
- access: public

mixed getEnv (string $key)

- string $key

getMethod (line 606)

Return the method by which the request was made

- access: public

string getMethod ()
getParam (line 515)

Retrieve a parameter

Retrieves a parameter from the instance. Priority is in the order of userland parameters (see setParam()), $_GET, $_POST. If a parameter matching the $key is not found, null is returned.

If the $key is an alias, the actual key aliased will be used.

- access: public

mixed getParam (mixed $key)

- mixed $key

getParams (line 539)

Retrieve an array of parameters

Retrieves a merged array of parameters, with precedence of userland params (see setParam()), $_GET, $POST (i.e., values in the userland params will take precedence over all others).

- access: public

array getParams ()
getPathInfo (line 478)

Returns everything between the BaseUrl and QueryString.

This value is calculated instead of reading PATH_INFO directly from $_SERVER due to cross-platform differences.

- access: public

string getPathInfo ()
getPost (line 211)

Retrieve a member of the $_POST superglobal

- return: Returns null if key does not exist
- access: public
- todo: How to retrieve from nested arrays

mixed getPost (string $key)

- string $key

getQuery (line 199)

Retrieve a member of the $_GET superglobal

- return: Returns null if key does not exist
- access: public
- todo: How to retrieve from nested arrays

mixed getQuery (string $key)

- string $key

getRequestUri (line 309)

Returns the REQUEST_URI taking into account platform differences between Apache and IIS

- access: public

string getRequestUri ()
getServer (line 234)

Retrieve a member of the $_SERVER superglobal

- return: Returns null if key does not exist
- access: public

mixed getServer (string $key)

- string $key

has (line 187)

Alias to __isset()

- access: public

boolean has (string $key)

- string $key

isPost (line 616)

Was the request made by POST?

- access: public

boolean isPost ()
set (line 152)

Alias to __set()

- access: public

unknown set (string $key, mixed $value)

- string $key
- mixed $value

setAlias (line 569)

Set a key alias

Set an alias used for key lookups. $name specifies the alias, $target specifies the actual key to use.

- access: public

void setAlias (string $name, string $target)

- string $name
- string $target

setBasePath (line 403)

Set the base path for the URL

- return: Returns false if no $basePath provided and unable to determine from environment
- access: public

void|false setBasePath ([string|null $basePath = null])

- string|null $basePath

setBaseUrl (line 329)

Set the base URL of the request; i.e., the segment leading to the script name

If a boolean true $baseUrl is provided, attempts to determine the base URL from the environment, using SCRIPT_FILENAME, SCRIPT_NAME, PHP_SELF, and ORIG_SCRIPT_NAME in its determination.

- return: Returns false if no $baseUrl provided and unable to determine baseUrl from environment
- access: public

void|false setBaseUrl ([mixed $baseUrl = null])

- mixed $baseUrl

setParam (line 497)

Set a userland parameter

Uses $key to set a userland parameter. If $key is an alias, the actual key will be retrieved and used to set the parameter.

- access: public

void setParam (mixed $key, mixed $value)

- mixed $key
- mixed $value

setParams (line 552)

Set parameters

Set one or more parameters. Parameters are set as userland parameters, using the keys specified in the array.

- access: public

void setParams ( $params)

- array $params

setPathInfo (line 444)

Set the PATH_INFO string

- return: Returns false if no $pathInfo provided and unable to determine it from the environment
- access: public

void|false setPathInfo ([string|null $pathInfo = null])

- string|null $pathInfo

setRequestUri (line 259)

Set the REQUEST_URI on which the instance operates

If no request URI is passed, uses the value in $_SERVER or $_SERVER['HTTP_X_REWRITE_URL']

- return: Returns false if no $requestUri provided and unable to find in $_SERVER
- access: public

void|false setRequestUri ([string $requestUri = null])

- string $requestUri

__get (line 92)

Access values contained in the superglobals as public members Order of precedence: 1. GET, 2. POST, 3. COOKIE, 4. SERVER, 5. ENV

- access: public
- see: http://msdn.microsoft.com/en-us/library/system.web.httprequest.item.aspx

mixed __get (string $key)

- string $key

__isset (line 163)

Check to see if a property is set

- access: public

boolean __isset (string $key)

- string $key

__set (line 140)

Set values

In order to follow __get(), which operates on a number of superglobals, setting values through overloading is not allowed and will raise an exception. Use setParam() instead.

- access: public
- throws: Zend_Http_Exception

void __set (string $key, mixed $value)

- string $key
- mixed $value

Documentation generated on Sun, 29 Oct 2006 21:28:01 -0600 by phpDocumentor 1.3.0RC6