cookie()
finish()
get()
getInstance()
hasValidationErrors()
post()
register()
request()
__construct()
getVar()
hasError()
isFloat()
isInteger()
isRegistered()
setErrorsToNull()
setValidationError()
transform()
validateArray()
validateValue()
$COOKIE
$COOKIEcleared
$GET
$GETcleared
$POST
$POSTcleared
$bHasValidationErrors
COOKIE
DATETIME_PATTERN
DATETIME_PATTERN_DE
DATE_PATTERN_DE
DATE_PATTERN_ISO
GET
HEXDEC_HASH
POST
TRANS_STRIP_HTML
TRANS_STRIP_PHP
TYPE_ARRAY
TYPE_FLOAT
TYPE_INTEGER
TYPE_STRING
Request class
version | $Id: class.request.php 32 2011-11-30 12:30:27Z oldperl $ |
---|---|
author | Andreas Kummer, w3concepts AG |
copyright | Copyright © 2008, w3concepts AG |
finish() : Object
Object
Reference to the current instance.get(String $sName, $bWithErrors) : Mixed
static | |
---|---|
access | public |
String
sName Name of the parameter.
Mixed
Value of the parameter or null.getInstance() : Object
static | |
---|---|
access | public |
Object
Reference to the current single instance of the class.hasValidationErrors(String $sRequestType, Array $aParams) : Boolean
String
sRequestType Request type.
Array
aParams Array of parameters to be checked.
Boolean
True if no validation errors occured. False otherwise.post(String $sName, $bWithErrors) : Mixed
static | |
---|---|
access | public |
String
sName Name of the parameter.
Mixed
Value of the parameter or null.register(String $sRequestType, String $sName, Integer $iType, Float $iMin, Float $iMax, String $sRegex, $iTransformation) : Object
access | public |
---|
String
sRequestType Either POST, GET or COOKIE.
String
sName Parameter name.
Integer
iType Parameter type (either integer, float or string).
Float
iMin Minimum length (string) or minimum value (float, integer).
Float
iMax Maximum length (string) or maximum value (float, integer).
String
sRegex Regex pattern the value is checked against.
Object
Reference to the current instance to enable method chaining.request(String $sName, $bWithErrors) : Mixed
static | |
---|---|
access | private |
String
sName Name of the parameter.
Mixed
Value of the parameter or null.__construct()
access | private |
---|
getVar(String $sRequestType, String $sName, $bWithErrors) : Mixed
The method throws an exception if the specified paramter has not yet been registered.
access | private |
---|
String
sRequestType Request type (GET, POST or COOKIE).
String
sName Name of the parameter.
Mixed
Value of the specified parameter.hasError(\Reference $mItem, Mixed $mKey) : Void
static | |
---|---|
access | private |
\Reference
mItem Reference to the current item.
Mixed
mKey Current key.
Void
isFloat(Mixed $mValue) : Boolean
static | |
---|---|
access | private |
Mixed
mValue Value to be checked.
Boolean
True if the value is a float or integer value.isInteger(Mixed $mValue) : Boolean
static | |
---|---|
access | private |
Mixed
mValue Value to be checked.
Boolean
True if the value is a integer value.isRegistered($sName, $sRequestType)
setErrorsToNull(\Reference $mItem, Mixed $mKey) : Void
static | |
---|---|
access | private |
\Reference
mItem Reference to the item of the array to be cleared.
Mixed
mKey Key of the current item to be processed.
Void
setValidationError(Boolean $bValidationError) : Void
Boolean
bValidationError True, if a validation error occured.
Void
transform(String $sValue, Integer $iRules) : String
static | |
---|---|
access | private |
String
sValue Value to be transformed.
Integer
iRules Sum of the transformation rules to be applied.
String
Transformed value.validateArray(\Reference $mItem, Mixed $mKey, Array $aParams) : Void
static | |
---|---|
access | private |
\Reference
mItem Reference to the item of the array to be validated.
Mixed
mKey Key of the current item to be processed.
Array
aParams Parameter array to be used in the validation process.
Void
validateValue(Mixed $mValue, Integer $iType, Integer $iMin, Integer $iMax, Integer $sRegex, $iTransformation) : Mixed
static | |
---|---|
access | private |
Mixed
mValue Value to be validated.
Integer
iType Type (integer, float or string).
Integer
iMin Minimum value (integer and float) or minimum length (string).
Integer
iMax Maximum value (integer and float) or maximum length (string).
Integer
iTransformation Sum of transformations to be applied.
Mixed
Either the transformed and validated value or null.$COOKIE
$COOKIEcleared
$GET
$GETcleared
$POST
$POSTcleared
$bHasValidationErrors
COOKIE
DATETIME_PATTERN
DATETIME_PATTERN_DE
DATE_PATTERN_DE
DATE_PATTERN_ISO
GET
HEXDEC_HASH
POST
TRANS_STRIP_HTML
TRANS_STRIP_PHP
TYPE_ARRAY
TYPE_FLOAT
TYPE_INTEGER
TYPE_STRING