Detailed Description

Validator is is the single entry point for validation.

It chooses the configured validateType based on the validateTypeDesc parameter from the configuration section 'validators'.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 23 of file Validator.php.

Static Public Member Functions

static validate ($value, $validateDesc, $context=null)
 

Static Protected Member Functions

static getValidateType ($validateTypeName)
 

Member Function Documentation

static validate (   $value,
  $validateDesc,
  $context = null 
)
static

Validate the given value against the given validateType description.

Parameters
$valueThe value to validate
$validateDescA string in the form validateTypeA,validateTypeB:optionsB, where validateType is a key in the configuration section 'validators' and options is a JSON encoded object as used in the 'validate_type' definition
$contextAn associative array describing the validation context which will be passed to the ValidateType::validate() method (optional)
Returns
Boolean

Definition at line 35 of file Validator.php.

static getValidateType (   $validateTypeName)
staticprotected

Get the ValidateType instance for the given name.

Parameters
$validateTypeNameThe validate type's name
Returns
ValidateType instance

Definition at line 84 of file Validator.php.