Elgg  Version 6.1
Public Member Functions | Protected Attributes | List of all members
Elgg\Validation\ValidationResults Class Reference

Represents a set of validated parameters. More...

Public Member Functions

 pass ($name, $value, $message= '')
 Add parameter and set it as valid. More...
 
 fail ($name, $value, $error= '')
 Add parameter and set it as invalid. More...
 
 all ()
 Get all results in this bag. More...
 
 getFailures ()
 Check if the bag has parameters that failed validation. More...
 

Protected Attributes

 $results = []
 

Detailed Description

Represents a set of validated parameters.

Definition at line 8 of file ValidationResults.php.

Member Function Documentation

Elgg\Validation\ValidationResults::all ( )

Get all results in this bag.

Returns
ValidationResult[]

Definition at line 55 of file ValidationResults.php.

Elgg\Validation\ValidationResults::fail (   $name,
  $value,
  $error = '' 
)

Add parameter and set it as invalid.

Parameters
string$nameParameter name
mixed$valueParameter value
string$errorError message
Returns
static

Definition at line 42 of file ValidationResults.php.

Elgg\Validation\ValidationResults::getFailures ( )

Check if the bag has parameters that failed validation.

Returns
ValidationResult[]|false

Definition at line 63 of file ValidationResults.php.

Elgg\Validation\ValidationResults::pass (   $name,
  $value,
  $message = '' 
)

Add parameter and set it as valid.

Parameters
string$nameParameter name
mixed$valueParameter value
string$messageSuccess message
Returns
static

Definition at line 24 of file ValidationResults.php.

Member Data Documentation

Elgg\Validation\ValidationResults::$results = []
protected

Definition at line 13 of file ValidationResults.php.


The documentation for this class was generated from the following file: