You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
819 B
PHTML

<?php
namespace Engelsystem;
/**
* BO that represents the result of an entity attribute validation.
* It contains the validated value and a bool for validation success.
*/
8 years ago
class ValidationResult
{
/** @var bool */
8 years ago
private $valid;
/** @var mixed */
8 years ago
private $value;
8 years ago
/**
* @param boolean $valid Is the value valid?
* @param mixed $value The validated value
8 years ago
*/
public function __construct($valid, $value)
{
$this->valid = $valid;
$this->value = $value;
}
8 years ago
/**
* Is the value valid?
*
* @return bool
8 years ago
*/
public function isValid()
{
return $this->valid;
}
8 years ago
/**
* The parsed/validated value.
*
* @return mixed
8 years ago
*/
public function getValue()
{
return $this->value;
}
}