PHP Class Jyxo\Input\Chain\Conditional

The validation itself is performed after fulfilling the condition. The condition is checked by a defined validator.
Author: Roman Řáha
Inheritance: extends Jyxo\Input\Chain
Afficher le fichier Open project: jyxo/php Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Jyxo\Input\ValidatorInterface $validator = null ) Sets the condition validator.
isValid ( mixed $value ) : boolean Validates a value.
setCondValidator ( Jyxo\Input\ValidatorInterface $validator ) : self Sets the condition validator.

Private Methods

Méthode Description
checkCondition ( mixed $value ) : boolean Checks if the condition is fulfilled.

Method Details

__construct() public méthode

Sets the condition validator.
public __construct ( Jyxo\Input\ValidatorInterface $validator = null )
$validator Jyxo\Input\ValidatorInterface

isValid() public méthode

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
Résultat boolean

setCondValidator() public méthode

Sets the condition validator.
public setCondValidator ( Jyxo\Input\ValidatorInterface $validator ) : self
$validator Jyxo\Input\ValidatorInterface Condition validator
Résultat self