Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/vendors/Textpattern/Validator/Validator.php - 113 lines - 2726 bytes - Source - Print

Description: (no description)

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Validator:: (4 methods):
__construct()
validate()
getMessages()
setConstraints()

Class: Validator

Main Validator class.

__construct($constraints = array()  line: 51
Constructs a validator.

param: \Textpattern\Validator\Constraint[] $constraints Array of constraint objects to validate over
validate()  line: 62
Validate all constraints and collect messages on violations.

return: bool If TRUE, the value obeys constraints
getMessages()  line: 79
Gets an array of messages.

This method returns an array of message strings with constraint-violation
details collected from Validator::validate().

return: array An array of messages
setConstraints($constraints line: 93
Sets new constraints.

This method takes an array of Textpattern\Validator\Constraint instances, and adds it to end of
the current stack.

param: \Textpattern\Validator\Constraint|\Textpattern\Validator\Constraint[] $constraints Single or array-of Textpattern\Validator\Constraint object(s)

title

Body