ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Factory for creating constraints. More...
Public Member Functions | |
__construct (Data\Factory $data_factory) | |
sequential (array $others) | |
Get a constraint that sequentially checks the supplied constraints. More... | |
parallel (array $others) | |
Get a constraint that checks the supplied constraints in parallel. More... | |
not (Constraint $other) | |
Get a negated constraint. More... | |
isInt () | |
Get a constraint for an integer. More... | |
greaterThan ($min) | |
Get the constraint that some value is larger than $min. More... | |
lessThan ($max) | |
Get the constraint that some value is smaller then $max. More... | |
custom (callable $is_ok, $error) | |
Get a custom constraint. More... | |
Protected Attributes | |
$data_factory | |
Factory for creating constraints.
Definition at line 12 of file Factory.php.
ILIAS\Validation\Factory::__construct | ( | Data\Factory | $data_factory | ) |
Definition at line 19 of file Factory.php.
ILIAS\Validation\Factory::custom | ( | callable | $is_ok, |
$error | |||
) |
Get a custom constraint.
If the provided value !$is_ok will either use the $error (if it is a string) or provide the value to the $error callback.
callable | $is_ok | MUST return boolean |
string | callable | $error |
Definition at line 108 of file Factory.php.
References $error.
ILIAS\Validation\Factory::greaterThan | ( | $min | ) |
Get the constraint that some value is larger than $min.
int | $min |
Definition at line 82 of file Factory.php.
ILIAS\Validation\Factory::isInt | ( | ) |
ILIAS\Validation\Factory::lessThan | ( | $max | ) |
Get the constraint that some value is smaller then $max.
int | $max |
Definition at line 93 of file Factory.php.
ILIAS\Validation\Factory::not | ( | Constraint | $other | ) |
Get a negated constraint.
Constraint | $other |
Definition at line 59 of file Factory.php.
ILIAS\Validation\Factory::parallel | ( | array | $others | ) |
Get a constraint that checks the supplied constraints in parallel.
The new constraint tells the problems of all violated constraints.
Constraint[] | $others |
Definition at line 48 of file Factory.php.
ILIAS\Validation\Factory::sequential | ( | array | $others | ) |
Get a constraint that sequentially checks the supplied constraints.
The new constraint tells the problem of the first violated constraint.
Constraint[] | $others |
Definition at line 35 of file Factory.php.
|
protected |
Definition at line 17 of file Factory.php.