|
eZ Publish
[trunk]
|
Provides access to HTTP post,get and session variables. More...
Public Member Functions | |
| attribute ($attr) | |
| attributes () | |
| createPostVarsFromImageButtons () | |
| eZHTTPTool () | |
| getSessionKey () | |
| Return the session id. | |
| getVariable ($var, $fallbackValue=null) | |
| hasAttribute ($attr) | |
| hasGetVariable ($var) | |
| hasPostVariable ($var) | |
| hasSessionVariable ($name, $forceStart=true) | |
| Check if session variable $name exists. | |
| hasVariable ($var) | |
| postVariable ($var, $fallbackValue=null) | |
| removeSessionVariable ($name) | |
| Unset the session variable $name. | |
| sessionID () | |
| Return the session id. | |
| & | sessionVariable ($name, $fallbackValue=null) |
| Get session variable $name. | |
| setGetVariable ($var, $value) | |
| setPostVariable ($var, $value) | |
| setSessionID ($sessionKey) | |
| Sets a new session id. | |
| setSessionKey ($sessionKey) | |
| Sets a new session id. | |
| setSessionVariable ($name, $value) | |
| Sets the session variable $name to value $value. | |
| variable ($var, $fallbackValue=null) | |
Static Public Member Functions | |
| static | createRedirectUrl ($path, $parameters=array()) |
| static | getDataByURL ($url, $justCheckURL=false, $userAgent=false) |
| static | headerVariable ($headerName, $headerData) |
| static | instance () |
| Return a unique instance of the eZHTTPTool class. | |
| static | parseHTTPResponse (&$response, &$header, &$body) |
| static | password () |
| static | redirect ($path, $parameters=array(), $status=false, $encodeURL=true) |
| Performs an HTTP redirect. | |
| static | removeMagicQuotes () |
| static | sendHTTPRequest ($uri, $port=false, $postParameters=false, $userAgent= 'eZ Publish', $passthrough=true, array $cookies=array()) |
| Sends a http request to the specified host. | |
| static | username () |
Provides access to HTTP post,get and session variables.
See PHP manual on Predefined Variables for more information.
Definition at line 23 of file ezhttptool.php.
| eZHTTPTool::attribute | ( | $ | attr | ) |
Definition at line 172 of file ezhttptool.php.
Definition at line 156 of file ezhttptool.php.
Referenced by hasAttribute().
Definition at line 675 of file ezhttptool.php.
| static 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.
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.
Definition at line 490 of file ezhttptool.php.
Referenced by redirect().
Initializes the class. Use eZHTTPTool::instance to get a single instance.
Definition at line 28 of file ezhttptool.php.
Referenced by instance().
| static eZHTTPTool::getDataByURL | ( | $ | url, |
| $ | justCheckURL = false, |
||
| $ | userAgent = false |
||
| ) | [static] |
| $url | |
| $justCheckURL | if true, we should check url only not downloading data. |
$url, false if invalid URL Definition at line 800 of file ezhttptool.php.
Referenced by eZRSSImport\getRSSVersion(), and eZStaticCache\storeCache().
Return the session id.
Definition at line 709 of file ezhttptool.php.
| eZHTTPTool::getVariable | ( | $ | var, |
| $ | fallbackValue = null |
||
| ) |
Definition at line 89 of file ezhttptool.php.
| eZHTTPTool::hasAttribute | ( | $ | attr | ) |
Definition at line 164 of file ezhttptool.php.
| eZHTTPTool::hasGetVariable | ( | $ | var | ) |
Definition at line 108 of file ezhttptool.php.
| eZHTTPTool::hasPostVariable | ( | $ | var | ) |
Definition at line 71 of file ezhttptool.php.
Referenced by eZHTTPPersistence\fetchElement(), eZHTTPPersistence\handleCheckedElement(), eZBinaryFileType\isDeletingFile(), and eZHTTPPersistence\splitSelected().
| eZHTTPTool::hasSessionVariable | ( | $ | name, |
| $ | forceStart = true |
||
| ) |
Check if session variable $name exists.
| string | $name | |
| bool | $forceStart | Force session start if true (default) |
Definition at line 755 of file ezhttptool.php.
| eZHTTPTool::hasVariable | ( | $ | var | ) |
Definition at line 117 of file ezhttptool.php.
| static eZHTTPTool::headerVariable | ( | $ | headerName, |
| $ | headerData | ||
| ) | [static] |
Sets the header variable $headerName to have the data $headerData.
Definition at line 630 of file ezhttptool.php.
Referenced by redirect().
| static eZHTTPTool::instance | ( | ) | [static] |
Return a unique instance of the eZHTTPTool class.
Definition at line 191 of file ezhttptool.php.
Referenced by eZModule\actionParameter(), eZShopOperationCollection\activateOrder(), eZURLOperator\applyQuotes(), eZContentBrowse\browse(), eZSearch\buildSearchArray(), eZContentClass\canInstantiateClassList(), checkNodeActions(), checkNodeAssignments(), checkNodeMovements(), checkRelationActions(), checkRelationAssignments(), eZContentUpload\cleanup(), eZContentUpload\cleanupAll(), eZTemplateCompiler\compilationFilename(), eZWizardBaseClassLoader\createClass(), createRedirectUrl(), eZModule\currentAction(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZCollaborationItemHandler\customInput(), eZObjectRelationListType\customObjectAttributeHTTPAction(), datatypeBasicFetchData(), datatypeDescribeFetchData(), eZMultiOption2Type\editTemplate(), eZContentObjectEditHandler\executeInputHandlers(), eZRole\expireCache(), eZCheckUser(), eZContentBrowse\eZContentBrowse(), eZContentUpload\eZContentUpload(), eZSetupCheckExecutable(), eZSetupFetchPersistenceList(), eZSetupRunTests(), eZSetupSetPersistencePostVariable(), eZWizardBase\eZWizardBase(), eZDefaultShopAccountHandler\fetchAccountInformation(), eZShopFunctionCollection\fetchBasket(), eZContentObjectStateGroup\fetchHTTPPersistentVariables(), eZContentObjectState\fetchHTTPPersistentVariables(), eZUserDiscountRule\fetchIDListByUserID(), eZContentObject\fetchInput(), eZContentObject\fixupInput(), eZPaymentGatewayType\getCurrentGatewayType(), getDataByURL(), getHTTPVariable(), eZContentObject\handleAllCustomHTTPActions(), eZContentObject\handleCustomHTTPActions(), eZModule\hasActionParameter(), eZCollaborationItemHandler\hasCustomInput(), eZCollaborationItemHandler\isCustomAction(), eZPreferences\isStoredInSession(), eZURLOperator\modify(), password(), processDropdownLimitations(), ezpMobileDeviceRegexpFilter\redirect(), eZRedirectManager\redirectURI(), eZContentBrowse\result(), sectionEditActionCheck(), eZPreferences\sessionCleanup(), eZContentUpload\setResult(), stateEditActionCheck(), eZModuleOperationInfo\storeBodyMemento(), eZPreferences\storedSessionValue(), eZPreferences\storeInSession(), storeNodeAssignments(), templateOperatorBasicFetchData(), templateOperatorDescribeFetchData(), eZContentUpload\upload(), eZURLOperator\urlTransformation(), username(), eZContentObject\validateInput(), eZContentObjectEditHandler\validateInputHandlers(), eZPreferences\value(), and eZPreferences\values().
| static eZHTTPTool::parseHTTPResponse | ( | &$ | response, |
| &$ | header, | ||
| &$ | body | ||
| ) | [static] |
Definition at line 386 of file ezhttptool.php.
Referenced by eZStepSiteTypes\downloadFile(), and eZECBHandler\requestRates().
| static eZHTTPTool::password | ( | ) | [static] |
Returns password from HTTP authentication or false if not logged in. See http://en.php.net/features.http-auth why you can`t safely use $_SERVER['PHP_AUTH_PW'].
Definition at line 448 of file ezhttptool.php.
| eZHTTPTool::postVariable | ( | $ | var, |
| $ | fallbackValue = null |
||
| ) |
Definition at line 52 of file ezhttptool.php.
Referenced by eZHTTPPersistence\fetchElement(), eZHTTPPersistence\handleCheckedElement(), eZBinaryFileType\isDeletingFile(), and eZHTTPPersistence\splitSelected().
| static eZHTTPTool::redirect | ( | $ | path, |
| $ | parameters = array(), |
||
| $ | status = false, |
||
| $ | encodeURL = true |
||
| ) | [static] |
Performs an HTTP redirect.
| $path | The path to redirect |
| $parameters |
| $status | The HTTP status code as a string |
| $encodeURL | Encode the URL. This should normally be true, but may be set to false to avoid double encoding when redirect() is called twice. |
Definition at line 602 of file ezhttptool.php.
Referenced by eZUserLoginHandler\checkUser(), eZUser\instance(), and eZSSLZone\switchIfNeeded().
| static eZHTTPTool::removeMagicQuotes | ( | ) | [static] |
Definition at line 635 of file ezhttptool.php.
Referenced by eZHTTPTool().
| eZHTTPTool::removeSessionVariable | ( | $ | name | ) |
Unset the session variable $name.
| string | $name |
Definition at line 743 of file ezhttptool.php.
| static eZHTTPTool::sendHTTPRequest | ( | $ | uri, |
| $ | port = false, |
||
| $ | postParameters = false, |
||
| $ | userAgent = 'eZ Publish', |
||
| $ | passthrough = true, |
||
| array $ | cookies = array() |
||
| ) | [static] |
Sends a http request to the specified host.
Using https:// requires compiled in OpenSSL support.
| string | $uri | http/https address or only path to send request to current eZ Publish instance examples: http://ez.no, https://secure.ez.no or content/view/full/2 |
| int | false | $port | Which port to connect to, default 80, uses port in $uri if present when $port = false |
| array | false | $postParameters | Optional post parameters array, if no post parameters are present, a GET request will be sent |
| string | $userAgent | User agent string, default will be 'eZ Publish' |
| bool | $passthrough | Will send result directly to client, default: true |
| array | $cookies | Optional hash of cookie name => values to add to http header |
Definition at line 216 of file ezhttptool.php.
Referenced by eZStepSiteTypes\downloadFile(), and eZECBHandler\requestRates().
| & eZHTTPTool::sessionVariable | ( | $ | name, |
| $ | fallbackValue = null |
||
| ) |
Get session variable $name.
| string | $name | |
| mixed | $fallbackValue | Return this if session has not started OR name is undefined if null(default), then force start session and return null if undefined. |
Definition at line 768 of file ezhttptool.php.
| eZHTTPTool::setGetVariable | ( | $ | var, |
| $ | value | ||
| ) |
Sets the get variable $var to $value.
Definition at line 80 of file ezhttptool.php.
| eZHTTPTool::setPostVariable | ( | $ | var, |
| $ | value | ||
| ) |
Sets the post variable $var to $value.
Definition at line 43 of file ezhttptool.php.
| eZHTTPTool::setSessionID | ( | $ | sessionKey | ) |
Sets a new session id.
| string | $sessionKey | Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus) |
Definition at line 789 of file ezhttptool.php.
| eZHTTPTool::setSessionKey | ( | $ | sessionKey | ) |
Sets a new session id.
| string | $sessionKey | Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus) |
Definition at line 721 of file ezhttptool.php.
| eZHTTPTool::setSessionVariable | ( | $ | name, |
| $ | value | ||
| ) |
Sets the session variable $name to value $value.
| string | $name | |
| mixed | $value |
Definition at line 732 of file ezhttptool.php.
| static eZHTTPTool::username | ( | ) | [static] |
Returns username from HTTP authentication or false if not logged in. See http://en.php.net/features.http-auth why you can`t safely use $_SERVER['PHP_AUTH_USER'].
Definition at line 423 of file ezhttptool.php.
| eZHTTPTool::variable | ( | $ | var, |
| $ | fallbackValue = null |
||
| ) |
Definition at line 134 of file ezhttptool.php.