[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/data/validator/ -> chainedvalidator.class.php (sommaire)

(pas de description)

Poids: 44 lignes (1 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

ChainedValidator:: (1 méthode):
  ChainedValidator()


Classe: ChainedValidator  - X-Ref

\ingroup Validator

Validator class that allows to make chained validators so that we can validate for more complex
rules. The parameter for the constructor is an array of Validator objects that we are going to
chain.

Internally, this class is not actually going to chain the validators but their rules, one after each
other using the Validator::addValidator() method.

You can either create your own brand new custom Validator class and add the rules that you need
or if you know that some Validator classes are already doing what you need, you can always
chain them by using the ChainedValidator class.

Example:

<pre>
$val = new ChainedValidator( Array( new StringValidator(),
new UsernameValidator());
$result = $val->validate( $value );
</pre>
ChainedValidator( $validators )   X-Ref
Constructor of the chained validator

param: validators An array of Validator objects which implement the logic that



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics