eZHTTPTool Class Reference
[HTTP utilities]
Provides access to HTTP post,get and session variables.
More...
List of all members.
Detailed Description
Provides access to HTTP post,get and session variables.
See PHP manual on Predefined Variables for more information.
Definition at line ezhttptool.php.
Constructor & Destructor Documentation
eZHTTPTool::eZHTTPTool |
( |
|
) |
|
|
Member Function Documentation
& eZHTTPTool::attribute |
( |
$ |
attr |
) |
|
|
|
- Returns:
-
the value for the attribute $attr or null if the attribute does not exist.
Definition at line ezhttptool.php. |
& eZHTTPTool::attributes |
( |
|
) |
|
|
|
- Returns:
-
the attributes for this object.
Definition at line ezhttptool.php. |
eZHTTPTool::createRedirectUrl |
( |
$ |
path, |
|
|
$ |
parameters = array() |
|
) |
[static] |
|
|
Sends a redirect path to the browser telling it to load the new path. By default only $path is required, other parameters will be fetched automatically to create a HTTP/1.1 compatible header. The input $parameters may contain the following keys.
- host - the name of the host, default will fetch the currenty hostname
- protocol - which protocol to use, default will use HTTP
- port - the port on the host
- username - a username which is required to login on the site
- password - if username is supplied this password will be used for authentication
The path may be specified relativily rel/ative , from root /a/root , with hostname change //myhost.com/a/root/rel/ative , with protocol http://myhost.com/a/root/rel/ative . Also port may be placed in the path string. It is recommended that the path only contain a plain root path and instead send the rest as optional parameters, the support for different kinds of paths is only incase you get URLs externally which contains any of the above cases.
- Note:
-
The redirection does not happen immedietaly and the script execution will continue.
Definition at line ezhttptool.php.
References eZSys::serverVariable(). |
eZHTTPTool::getSessionKey |
( |
|
) |
|
|
|
Sets the session variable $name to value $value.
Definition at line ezhttptool.php. |
& eZHTTPTool::getVariable |
( |
$ |
var |
) |
|
|
eZHTTPTool::hasAttribute |
( |
$ |
attr |
) |
|
|
|
- Returns:
-
true if the attribute $attr exist.
Definition at line ezhttptool.php. |
& eZHTTPTool::hasGetVariable |
( |
$ |
var |
) |
|
|
& eZHTTPTool::hasPostVariable |
( |
$ |
var |
) |
|
|
eZHTTPTool::hasSessionVariable |
( |
$ |
name |
) |
|
|
eZHTTPTool::hasVariable |
( |
$ |
var |
) |
|
|
eZHTTPTool::headerVariable |
( |
$ |
headerName, |
|
|
$ |
headerData |
|
) |
[static] |
|
|
Sets the header variable $headerName to have the data $headerData. - Note:
-
Calls PHPs header() with a constructed string.
Definition at line ezhttptool.php. |
& eZHTTPTool::instance |
( |
|
) |
|
|
& eZHTTPTool::postVariable |
( |
$ |
var |
) |
|
|
eZHTTPTool::removeSessionVariable |
( |
$ |
name |
) |
|
|
|
Removes the session variable $name.
Definition at line ezhttptool.php. |
eZHTTPTool::sessionID |
( |
|
) |
|
|
& eZHTTPTool::sessionVariable |
( |
$ |
name |
) |
|
|
eZHTTPTool::setGetVariable |
( |
$ |
var, |
|
|
$ |
value |
|
) |
|
|
eZHTTPTool::setPostVariable |
( |
$ |
var, |
|
|
$ |
value |
|
) |
|
|
eZHTTPTool::variable |
( |
$ |
var |
) |
|
|
|
- Returns:
-
a reference to the HTTP post/get variable $var, or null if it does not exist.
- See also:
-
postVariable
Definition at line ezhttptool.php. |
The documentation for this class was generated from the following file:
|