This class is the extended version of excelent code made by kummer.
version | 1.0.1 |
---|---|
see | \global\http://contenido.org/forum/viewtopic.php?p=113492#113492 |
HttpInputValidator(string $sConfigPath) : \HttpInputValidator
Configuration path $sConfigPath is mandatory and has to contain the complete path to configuration file with defined parameters.
The class provides two modes: training and arcade. Training mode only logs violations - if log path is given into log file otherwise as comment into HTML output. Arcade mode is made for killing - every violation will cause an hard exit!
string
checkGetParams() : bool
bool
checkParameter(string $sType, string $sKey, mixed $mValue) : bool
In this case or in case of unknown but empty params, the method will also return true.
string
string
mixed
bool
checkPostParams()
Is POST-param known and valid mapped value is true.
isRegularPost(string $sKey) : mixed
string
mixed
logHackTrial()
showPosts($bReturn) : string
string
$aCheck : array
Structure has to be:
$check['GET']['param1'] = VALIDATE_FORMAT;
$check['POST']['param2'] = VALIDATE_FORMAT;
Possible formats are defined as constants in top of these class file.
$aPostVariables : array
$bLog : boolean
$sConfigPath : string
$sFailure : string
$sLogPath : string
$sMode : string