Claro_Input_Validator Class Reference

Inheritance diagram for Claro_Input_Validator:
Claro_Input

Public Member Functions

 __construct (Claro_Input $input)
 setValidator ($name, Claro_Validator $validator)
 setValidatorForAll (Claro_Validator $validator)
 get ($name, $default=null)
 getMandatory ($name)
 validate ($name, $tainted)

Protected Attributes

 $validators
 $validatorsForAll
 $input

Detailed Description

Data input class with filters callback for validation

Definition at line 114 of file input.lib.php.


Constructor & Destructor Documentation

__construct ( Claro_Input input  ) 
Parameters:
Claro_Input $input

Definition at line 123 of file input.lib.php.


Member Function Documentation

get ( name,
default = null 
)
See also:
Claro_Input
Exceptions:
Claro_Input_Exception if $value does not pass the validator

Implements Claro_Input.

Definition at line 177 of file input.lib.php.

getMandatory ( name  ) 
See also:
Claro_Input
Exceptions:
Claro_Input_Exception if $value does not pass the validator

Implements Claro_Input.

Definition at line 196 of file input.lib.php.

setValidator ( name,
Claro_Validator validator 
)

Set a validator for the given variable

Parameters:
string $name variable name
Claro_Validator $validator validator object
Exceptions:
Claro_Input_Exception if the filter callback is not callable

Definition at line 136 of file input.lib.php.

setValidatorForAll ( Claro_Validator validator  ) 

Set a validator for all variables

Parameters:
string $name variable name
Claro_Validator $validator validator object
Exceptions:
Claro_Input_Exception if the filter callback is not callable

Definition at line 160 of file input.lib.php.

validate ( name,
tainted 
)
Parameters:
string $name
mixed $tainted value
Exceptions:
Claro_Validator_Exception if $value does not pass the filter for $name

Definition at line 209 of file input.lib.php.


Field Documentation

$input [protected]

Definition at line 118 of file input.lib.php.

$validators [protected]

Definition at line 116 of file input.lib.php.

$validatorsForAll [protected]

Definition at line 117 of file input.lib.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 12:28:38 2010 for Claroline API by  doxygen 1.6.3