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

Represents a parameter that has been validated. More...

Public Member Functions

 __construct ($name, $value)
 Constructor. More...
 
 pass ($message= '')
 Set parameter value as passing validation. More...
 
 fail ($error= '')
 Set parameter value as failing validation. More...
 
 isValid ()
 Is parameter value valid? More...
 
 getName ()
 Get parameter name. More...
 
 getValue ()
 Get parameter valud. More...
 
 getError ()
 Get error message. More...
 
 getMessage ()
 Get success message. More...
 

Protected Attributes

 $name
 
 $value
 
 $message
 
 $error
 

Detailed Description

Represents a parameter that has been validated.

Definition at line 8 of file ValidationResult.php.

Constructor & Destructor Documentation

Elgg\Validation\ValidationResult::__construct (   $name,
  $value 
)

Constructor.

Parameters
string$nameParameter name
mixed$valueParameter value

Definition at line 36 of file ValidationResult.php.

Member Function Documentation

Elgg\Validation\ValidationResult::fail (   $error = '')

Set parameter value as failing validation.

Parameters
string$errorOptional error message
Returns
void

Definition at line 59 of file ValidationResult.php.

Elgg\Validation\ValidationResult::getError ( )

Get error message.

Returns
mixed

Definition at line 95 of file ValidationResult.php.

Elgg\Validation\ValidationResult::getMessage ( )

Get success message.

Returns
mixed

Definition at line 104 of file ValidationResult.php.

Elgg\Validation\ValidationResult::getName ( )

Get parameter name.

Returns
string

Definition at line 77 of file ValidationResult.php.

Elgg\Validation\ValidationResult::getValue ( )

Get parameter valud.

Returns
mixed

Definition at line 86 of file ValidationResult.php.

Elgg\Validation\ValidationResult::isValid ( )

Is parameter value valid?

Returns
bool

Definition at line 68 of file ValidationResult.php.

Elgg\Validation\ValidationResult::pass (   $message = '')

Set parameter value as passing validation.

Parameters
string$messageOptional message
Returns
void

Definition at line 48 of file ValidationResult.php.

Member Data Documentation

Elgg\Validation\ValidationResult::$error
protected

Definition at line 28 of file ValidationResult.php.

Elgg\Validation\ValidationResult::$message
protected

Definition at line 23 of file ValidationResult.php.

Elgg\Validation\ValidationResult::$name
protected

Definition at line 13 of file ValidationResult.php.

Elgg\Validation\ValidationResult::$value
protected

Definition at line 18 of file ValidationResult.php.


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