[ 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/ -> validator.class.php (sommaire)

\defgroup Validator Validator in pLog is an implementation of the 'Strategy' pattern as it can be seen http://www.phppatterns.com/index.php/article/articleview/13/1/1/.

Poids: 117 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 17 fois
Nécessite: 0 fichiers

Définit 1 class

Validator:: (4 méthodes):
  Validator()
  addRule()
  addValidator()
  validate()


Classe: Validator  - X-Ref

\ingroup Validator

Base class that all other validators extend. See the documentation of the Validator module for more
information.
Validator()   X-Ref
Initializes the constructor


addRule(&$rule)   X-Ref
Adds a rule to the Validator

param: rule A valid Rule object

addValidator(&$validator)   X-Ref
Our validators can also be built based on other validators. It is also possible
to use the ChainedValidator if we don't wish to create a completely new Validator

param: validator A Validator object or a class extending from it

validate($value)   X-Ref
This is the main method that takes care of processing all the rules. It is not necessary
to reimplement this method in our custom Validator classes if we have already added some rules,
as this method already provides some logic for going through the rules and setting some extended
error codes if necessary.

If your custom validator does not use rules, it is safe to reimplement this method.

param: value The value that we're going to validate.



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