lib/ezutils/classes/ezhttptool.php

Show: inherited
Table of Contents

File containing the eZHTTPTool class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
lib  
Version
4.6.0  

\eZHTTPTool

Package: lib

File containing the eZHTTPTool class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Version
4.6.0  

Methods

methodpublicattribute(  $attr ) : void

Parameters
Name Type Description
$attr
methodpublicattributes( ) : void

methodpubliccreatePostVarsFromImageButtons( ) : void

methodpubliccreateRedirectUrl(  $path,  $parameters = array() ) : void
static

Parameters
Name Type Description
$path
$parameters
methodpubliceZHTTPTool( ) : void

methodpublicgetDataByURL(  $url,  $justCheckURL = false,  $userAgent = false ) : void
static

Parameters
Name Type Description
$url
$justCheckURL
$userAgent
methodpublicgetSessionKey( ) : string

Return the session id

Returns
Type Description
string
Details
Deprecated
Since 4.4, use ->sessionID instead!  
methodpublicgetVariable(  $var,  $fallbackValue = null ) : void

Parameters
Name Type Description
$var
$fallbackValue
methodpublichasAttribute(  $attr ) : void

Parameters
Name Type Description
$attr
methodpublichasGetVariable(  $var ) : void

Parameters
Name Type Description
$var
methodpublichasPostVariable(  $var ) : void

Parameters
Name Type Description
$var
methodpublichasSessionVariable( string $name, bool $forceStart = true ) : bool | null

Check if session variable $name exists

Parameters
Name Type Description
$name string
$forceStart bool

Force session start if true (default)

Returns
Type Description
bool | null Null if session has not started and $forceStart is false
methodpublichasVariable(  $var ) : void

Parameters
Name Type Description
$var
methodpublicheaderVariable(  $headerName,  $headerData ) : void
static

Parameters
Name Type Description
$headerName
$headerData
methodpublicinstance( ) : \eZHTTPTool
static

Return a unique instance of the eZHTTPTool class

Returns
Type Description
\eZHTTPTool
methodpublicparseHTTPResponse(  $response,  $header,  $body ) : void
static

Parameters
Name Type Description
$response
$header
$body
methodpublicpassword( ) : void
static

methodpublicpostVariable(  $var,  $fallbackValue = null ) : void

Parameters
Name Type Description
$var
$fallbackValue
methodpublicredirect(  $path,  $parameters = array(),  $status = false,  $encodeURL = true ) : void
static

\static Performs an HTTP redirect.

\param $path The path to redirect \param $parameters \see createRedirectUrl() \param $status The HTTP status code as a string \param $encodeURL Encode the URL. This should normally be true, but may be set to false to avoid double encoding when redirect() is called twice.

Parameters
Name Type Description
$path
$parameters
$status
$encodeURL
methodpublicremoveMagicQuotes( ) : void
static

methodpublicremoveSessionVariable( string $name ) : bool

Unset the session variable $name

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicsendHTTPRequest( string $uri, int | false $port = false, array | false $postParameters = false, string $userAgent = 'eZ Publish', bool $passthrough = true, array $cookies = array() ) : string | false
static

Sends a http request to the specified host. Using https:// requires compiled in OpenSSL support.

Parameters
Name Type Description
$uri string

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

$port int | false

Which port to connect to, default 80, uses port in $uri if present when $port = false

$postParameters array | false

Optional post parameters array, if no post parameters are present, a GET request will be sent

$userAgent string

User agent string, default will be 'eZ Publish'

$passthrough bool

Will send result directly to client, default: true

$cookies array

Optional hash of cookie name => values to add to http header

Returns
Type Description
string | false String if http request, or false if an error occurs. If $passthrough = true, program will end here and send result directly to client.
methodpublicsessionID( ) : string

Return the session id

Returns
Type Description
string
methodpublicsessionVariable( string $name, mixed $fallbackValue = null ) : mixed

Get session variable $name

Parameters
Name Type Description
$name string
$fallbackValue mixed

Return this if session has not started OR name is undefined if null(default), then force start session and return null if undefined.

Returns
Type Description
mixed ByRef
methodpublicsetGetVariable(  $var,  $value ) : void

Parameters
Name Type Description
$var
$value
methodpublicsetPostVariable(  $var,  $value ) : void

Parameters
Name Type Description
$var
$value
methodpublicsetSessionID( string $sessionKey ) : string

Sets a new session id

Parameters
Name Type Description
$sessionKey string

Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus)

Returns
Type Description
string Current(old) session id
methodpublicsetSessionKey( string $sessionKey ) : string

Sets a new session id

Parameters
Name Type Description
$sessionKey string

Allowed characters in the range a-z A-Z 0-9 , (comma) and - (minus)

Returns
Type Description
string Current(old) session id
Details
Deprecated
Since 4.4, use ->setSessionID instead!  
methodpublicsetSessionVariable( string $name, mixed $value ) : void

Sets the session variable $name to value $value.

Parameters
Name Type Description
$name string
$value mixed
methodpublicusername( ) : void
static

methodpublicvariable(  $var,  $fallbackValue = null ) : void

Parameters
Name Type Description
$var
$fallbackValue
Documentation was generated by DocBlox 0.18.1.