eZPublish
4.7
|
Provides access to HTTP post,get and session variables. More...
Public Member Functions | |
attribute ($attr) | |
attributes () | |
createPostVarsFromImageButtons () | |
eZHTTPTool () | |
getSessionKey () | |
Return the session id. More... | |
getVariable ($var, $fallbackValue=null) | |
hasAttribute ($attr) | |
hasGetVariable ($var) | |
hasPostVariable ($var) | |
hasSessionVariable ($name, $forceStart=true) | |
Check if session variable $name exists. More... | |
hasVariable ($var) | |
postVariable ($var, $fallbackValue=null) | |
removeSessionVariable ($name) | |
Unset the session variable $name. More... | |
sessionID () | |
Return the session id. More... | |
& | sessionVariable ($name, $fallbackValue=null) |
Get session variable $name. More... | |
setGetVariable ($var, $value) | |
setPostVariable ($var, $value) | |
setSessionID ($sessionKey) | |
Sets a new session id. More... | |
setSessionKey ($sessionKey) | |
Sets a new session id. More... | |
setSessionVariable ($name, $value) | |
Sets the session variable $name to value $value. More... | |
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. More... | |
static | parseHTTPResponse (&$response, &$header, &$body) |
static | password () |
static | redirect ($path, $parameters=array(), $status=false, $encodeURL=true) |
Performs an HTTP redirect. More... | |
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. More... | |
static | username () |
Provides access to HTTP post,get and session variables.
See PHP manual on Predefined Variables for more information.
eZHTTPTool::attribute | ( | $attr | ) |
eZHTTPTool::attributes | ( | ) |
Referenced by hasAttribute().
eZHTTPTool::createPostVarsFromImageButtons | ( | ) |
|
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.
Referenced by redirect().
eZHTTPTool::eZHTTPTool | ( | ) |
Initializes the class. Use eZHTTPTool::instance to get a single instance.
Referenced by instance().
$url | |
$justCheckURL | if true, we should check url only not downloading data. |
$url
, false if invalid URL Referenced by eZRSSImport\getRSSVersion(), and eZStaticCache\storeCache().
eZHTTPTool::getSessionKey | ( | ) |
eZHTTPTool::getVariable | ( | $var, | |
$fallbackValue = null |
|||
) |
eZHTTPTool::hasAttribute | ( | $attr | ) |
eZHTTPTool::hasGetVariable | ( | $var | ) |
eZHTTPTool::hasPostVariable | ( | $var | ) |
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) |
eZHTTPTool::hasVariable | ( | $var | ) |
|
static |
Sets the header variable $headerName to have the data $headerData.
Referenced by redirect().
|
static |
Return a unique instance of the eZHTTPTool class.
Referenced by eZUser\_loginUser(), eZModule\actionParameter(), eZShopOperationCollection\activateOrder(), eZURLOperator\applyQuotes(), eZContentBrowse\browse(), eZSearch\buildSearchArray(), eZContentClass\canInstantiateClassList(), checkNodeActions(), checkNodeAssignments(), checkNodeMovements(), checkRelationActions(), checkRelationAssignments(), eZUserLoginHandler\checkUser(), eZUser\checkUser(), eZUser\cleanup(), eZContentUpload\cleanup(), eZContentUpload\cleanupAll(), eZTemplateCompiler\compilationFilename(), eZWizardBaseClassLoader\createClass(), eZModule\currentAction(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZCollaborationItemHandler\customInput(), eZObjectRelationListType\customObjectAttributeHTTPAction(), datatypeBasicFetchData(), datatypeDescribeFetchData(), eZMultiOption2Type\editTemplate(), eZModuleOperationInfo\execute(), 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(), eZUserLoginHandler\forceLogin(), eZPaymentGatewayType\getCurrentGatewayType(), getHTTPVariable(), eZContentObject\handleAllCustomHTTPActions(), eZContentObject\handleCustomHTTPActions(), eZModule\hasActionParameter(), eZCollaborationItemHandler\hasCustomInput(), eZUser\instance(), eZCollaborationItemHandler\isCustomAction(), eZPreferences\isStoredInSession(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), eZUser\logoutCurrent(), eZURLOperator\modify(), eZUserLoginHandler\preCheck(), processDropdownLimitations(), ezpMobileDeviceRegexpFilter\redirect(), eZRedirectManager\redirectURI(), eZContentBrowse\result(), sectionEditActionCheck(), eZUserLoginHandler\sessionCleanup(), eZPreferences\sessionCleanup(), eZContentUpload\setResult(), stateEditActionCheck(), eZModuleOperationInfo\storeBodyMemento(), eZPreferences\storedSessionValue(), eZPreferences\storeInSession(), storeNodeAssignments(), eZModuleOperationInfo\storeOperationMemento(), templateOperatorBasicFetchData(), templateOperatorDescribeFetchData(), eZContentUpload\upload(), eZURLOperator\urlTransformation(), eZContentObject\validateInput(), eZContentObjectEditHandler\validateInputHandlers(), eZPreferences\value(), and eZPreferences\values().
|
static |
Referenced by eZStepSiteTypes\downloadFile(), and eZECBHandler\requestRates().
|
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'].
eZHTTPTool::postVariable | ( | $var, | |
$fallbackValue = null |
|||
) |
Referenced by eZHTTPPersistence\fetchElement(), eZHTTPPersistence\handleCheckedElement(), eZBinaryFileType\isDeletingFile(), and eZHTTPPersistence\splitSelected().
|
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. |
Referenced by eZUserLoginHandler\checkUser(), eZUser\instance(), and eZSSLZone\switchIfNeeded().
|
static |
Referenced by eZHTTPTool().
eZHTTPTool::removeSessionVariable | ( | $name | ) |
Unset the session variable $name.
string | $name |
|
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 |
Referenced by eZStepSiteTypes\downloadFile(), and eZECBHandler\requestRates().
eZHTTPTool::sessionID | ( | ) |
Return the session id.
& 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. |
eZHTTPTool::setGetVariable | ( | $var, | |
$value | |||
) |
Sets the get variable $var to $value.
eZHTTPTool::setPostVariable | ( | $var, | |
$value | |||
) |
Sets the post variable $var to $value.
eZHTTPTool::setSessionID | ( | $sessionKey | ) |
Sets a new session id.
string | $sessionKey | Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus) |
eZHTTPTool::setSessionKey | ( | $sessionKey | ) |
Sets a new session id.
string | $sessionKey | Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus) |
eZHTTPTool::setSessionVariable | ( | $name, | |
$value | |||
) |
Sets the session variable $name to value $value.
string | $name | |
mixed | $value |
|
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'].
eZHTTPTool::variable | ( | $var, | |
$fallbackValue = null |
|||
) |