closure Class Reference

Detailed Description

customizable validator for input elements

Definition at line 11 of file closure.php.

Inheritance diagram for closure:

Public Member Functions

 validate ($value, $parameters=array())
 validates value with a callable function/closure More...
 
 setFunc ($validatorFunction)
 sets the validators validator function More...
 
- Public Member Functions inherited from validator
 __construct ($log=null)
 validator constructor More...
 
 validate ($value, $parameters=array())
 default validator. More...
 
 getPatternAttribute ()
 returns validators' regular expression as HTML5 pattern attribute More...
 

Protected Attributes

 $validatorFunction
 function to call More...
 
- Protected Attributes inherited from validator
 $log
 log object More...
 

Additional Inherited Members

- Static Public Member Functions inherited from validator
static factory ($argument, $log=null)
 valdiator object factory More...
 
static isValid ($input)
 
- Protected Member Functions inherited from validator
 log ($argument, $type)
 error logging method More...
 

Member Function Documentation

setFunc (   $validatorFunction)

sets the validators validator function

Parameters
closure$validatorFunctionfunction
Returns
void

Definition at line 36 of file closure.php.

validate (   $value,
  $parameters = array() 
)

validates value with a callable function/closure

Parameters
string$valuevalue to be validated
array$parametersvalidation parameters
Returns
bool validation result

Definition at line 25 of file closure.php.

Field Documentation

$validatorFunction
protected

function to call

Definition at line 16 of file closure.php.


The documentation for this class was generated from the following file: