Class xPDOValidator

Description

The base validation service class.

Extend this class to customize the validation process.

Located in /xpdo/validation/xpdovalidator.class.php (line 38)


	
			
Variable Summary
 mixed $messages
 mixed $object
 mixed $results
Method Summary
 xPDOValidator __construct ( &$object)
 void addMessage (string $field, string $name, [mixed $message = null])
 array getMessages ()
 array getResults ()
 boolean hasMessages ()
 void reset ()
 boolean validate ([ $parameters = array()])
Variables
mixed $messages = array() (line 41)
  • access: public
mixed $object = null (line 39)
  • access: public
mixed $results = array() (line 40)
  • access: public
Methods
Constructor __construct (line 43)
  • access: public
xPDOValidator __construct ( &$object)
  • &$object
addMessage (line 142)

Add a validation message to the stack.

  • access: public
void addMessage (string $field, string $name, [mixed $message = null])
  • string $field: The name of the field the message relates to.
  • string $name: The name of the rule the message relates to.
  • mixed $message: An optional message; the name of the rule is used if no message is specified.
getMessages (line 165)

Get the validation messages generated by validate().

  • return: An array of validation messages.
  • access: public
array getMessages ()
getResults (line 174)

Get the validation results generated by validate().

  • return: An array of boolean validation results.
  • access: public
array getResults ()
hasMessages (line 156)

Indicates validation messages were generated by validate().

  • return: True if messages were generated.
  • access: public
boolean hasMessages ()
reset (line 181)

Reset the validation results and messages.

  • access: public
void reset ()
validate (line 54)

Executes validation against the object attached to this validator.

  • return: Either true or false indicating valid or invalid.
  • access: public
boolean validate ([ $parameters = array()])
  • array $parameters: A collection of parameters.

Documentation generated on Fri, 17 Jun 2011 10:04:14 -0600 by phpDocumentor 1.4.3