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
ObjectReference to the current instance.get(String $sName, $bWithErrors) : Mixed
| static | |
|---|---|
| access | public |
StringsName Name of the parameter.
MixedValue of the parameter or null.getInstance() : Object
| static | |
|---|---|
| access | public |
ObjectReference to the current single instance of the class.hasValidationErrors(String $sRequestType, Array $aParams) : Boolean
StringsRequestType Request type.
ArrayaParams Array of parameters to be checked.
BooleanTrue if no validation errors occured. False otherwise.post(String $sName, $bWithErrors) : Mixed
| static | |
|---|---|
| access | public |
StringsName Name of the parameter.
MixedValue of the parameter or null.register(String $sRequestType, String $sName, Integer $iType, Float $iMin, Float $iMax, String $sRegex, $iTransformation) : Object
| access | public |
|---|
StringsRequestType Either POST, GET or COOKIE.
StringsName Parameter name.
IntegeriType Parameter type (either integer, float or string).
FloatiMin Minimum length (string) or minimum value (float, integer).
FloatiMax Maximum length (string) or maximum value (float, integer).
StringsRegex Regex pattern the value is checked against.
ObjectReference to the current instance to enable method chaining.request(String $sName, $bWithErrors) : Mixed
| static | |
|---|---|
| access | private |
StringsName Name of the parameter.
MixedValue 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 |
|---|
StringsRequestType Request type (GET, POST or COOKIE).
StringsName Name of the parameter.
MixedValue of the specified parameter.hasError(\Reference $mItem, Mixed $mKey) : Void
| static | |
|---|---|
| access | private |
\ReferencemItem Reference to the current item.
MixedmKey Current key.
VoidisFloat(Mixed $mValue) : Boolean
| static | |
|---|---|
| access | private |
MixedmValue Value to be checked.
BooleanTrue if the value is a float or integer value.isInteger(Mixed $mValue) : Boolean
| static | |
|---|---|
| access | private |
MixedmValue Value to be checked.
BooleanTrue if the value is a integer value.isRegistered($sName, $sRequestType)
setErrorsToNull(\Reference $mItem, Mixed $mKey) : Void
| static | |
|---|---|
| access | private |
\ReferencemItem Reference to the item of the array to be cleared.
MixedmKey Key of the current item to be processed.
VoidsetValidationError(Boolean $bValidationError) : Void
BooleanbValidationError True, if a validation error occured.
Voidtransform(String $sValue, Integer $iRules) : String
| static | |
|---|---|
| access | private |
StringsValue Value to be transformed.
IntegeriRules Sum of the transformation rules to be applied.
StringTransformed value.validateArray(\Reference $mItem, Mixed $mKey, Array $aParams) : Void
| static | |
|---|---|
| access | private |
\ReferencemItem Reference to the item of the array to be validated.
MixedmKey Key of the current item to be processed.
ArrayaParams Parameter array to be used in the validation process.
VoidvalidateValue(Mixed $mValue, Integer $iType, Integer $iMin, Integer $iMax, Integer $sRegex, $iTransformation) : Mixed
| static | |
|---|---|
| access | private |
MixedmValue Value to be validated.
IntegeriType Type (integer, float or string).
IntegeriMin Minimum value (integer and float) or minimum length (string).
IntegeriMax Maximum value (integer and float) or maximum length (string).
IntegeriTransformation Sum of transformations to be applied.
MixedEither 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