API documentation :: Docs For Class arbitHttpTools
Packages:Interfaces:
Classes:
|
Core::arbitHttpToolsClass arbitHttpToolsArbit HTTP tool class Provides basic methods to interface with the request handling environment offered by PHP, implementing sanity checking, and a abstraction layer to be more setup independant. Arbit HTTP tool class Provides basic methods to interface with the request handling environment offered by PHP, implementing sanity checking, and a abstraction layer to be more setup independant.
Constants
Member Variables
Method Summary
Methodserror
static void
error(
int
$code
)
Send HTTP error Send a HTTP error of the provided code. Send HTTP error Send a HTTP error of the provided code. Parameters:
get
static mixed
get(
string
$name
, [int
$type
= self::TYPE_STRING] )
Get a request variable. Get a request variable. Get POST and COOKIE variables from the current request context. GET variables can already be found in the arbit request struct, so that they cannot be fetched using this method. You may specify the type of the variable you want to receive by the optional second parameter. It defaults to string, which means that no modifications are applied to the request value. If the variable is not available in the current request, or the contents from a form were requested, and the one-time token wasn't valid anymore the method will return null. Parameters:
getFiles
static array
getFiles(
string
$name
)
Get files for given identifier Get all files, which are sent by the client with the given identifier. Get files for given identifier Get all files, which are sent by the client with the given identifier. Parameters:
header
static void
header(
string
$string
)
Send header Send HTTP header, if this is still possible, and throw a exception otherwise. Send header Send HTTP header, if this is still possible, and throw a exception otherwise. The exception may be cought in test cases to ensure the correct header has been sent. Parameters:
isHttpRequest
static bool
isHttpRequest(
)
Is this a HTTP request? Returns true, if this is a HTTP request, and headers may be sent. is required, since the PHP session functions try to send headers themselves and does not allow us to dispatch the sending of headers into the proper output writers. Is this a HTTP request? Returns true, if this is a HTTP request, and headers may be sent. This is required, since the PHP session functions try to send headers themselves and does not allow us to dispatch the sending of headers into the proper output writers. serverVariable
static string
serverVariable(
string
$key
)
Return server environment variable value Return (unquoted) value from the superglobal $_SERVER array. value is not available, return the default value. default value either, null will be returned. Return server environment variable value Return (unquoted) value from the superglobal $_SERVER array. If the value is not available, return the default value. If there isn't a default value either, null will be returned. Parameters:
setCookie
static void
setCookie(
string
$name
, string
$value
, string
$path
, [int
$time
= 0] , [bool
$httpOnly
= true] )
Set cookie Set a cookie with the given name and value for the currently used host. Set cookie Set a cookie with the given name and value for the currently used host. A path is mandatory to specify the current root of the project. Parameters:
unquote
static string
unquote(
string
$value
)
Unquote autoescaped values If magic_quotes_gpc is set, all values are pseudo-escaped with useless slashes. disable magic_quotes_gpc in your global php. Unquote autoescaped values If magic_quotes_gpc is set, all values are pseudo-escaped with useless slashes. We remove them, if set, or just keep the value. You WANT to disable magic_quotes_gpc in your global php.ini. Parameters:
Documentation generated on Mon, 05 Apr 2010 14:01:59 +0200 by phpDocumentor 1.4.3
|