|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Inheritance diagram for ILIAS\Refinery\Custom\Constraint:
Collaboration diagram for ILIAS\Refinery\Custom\Constraint:Public Member Functions | ||||||
| __construct (callable $is_ok, $error, Data\Factory $data_factory, \ilLanguage $lng) | ||||||
| If $error is a callable it needs to take two parameters: More... | ||||||
| check ($value) | ||||||
Checks the provided value.Should not throw if accepts($value).
UnexpectedValueException if value does not comply with encoded constraint.
| ||||||
| accepts ($value) | ||||||
Tells if the provided value complies.
| ||||||
| problemWith ($value) | ||||||
Tells what the problem with the provided value is.Should return null if accepts($value).
| ||||||
| applyTo (Result $result) | ||||||
Restricts a Result.Must do nothing with the result if $result->isError(). Must replace the result with an error according to problemWith() if !accepts($result->value()).
| ||||||
Public Member Functions inherited from ILIAS\Refinery\Constraint | ||||||
| check ($value) | ||||||
| Checks the provided value. More... | ||||||
| accepts ($value) | ||||||
| Tells if the provided value complies. More... | ||||||
| problemWith ($value) | ||||||
| Tells what the problem with the provided value is. More... | ||||||
| applyTo (Result $result) | ||||||
| Restricts a Result. More... | ||||||
| withProblemBuilder (callable $builder) | ||||||
| Get a constraint like this one with a builder for a custom error message. More... | ||||||
Public Member Functions inherited from ILIAS\Refinery\Transformation | ||||||
| transform ($from) | ||||||
| Perform the transformation. More... | ||||||
| applyTo (Result $data) | ||||||
| Perform the transformation and reify possible failures. More... | ||||||
| __invoke ($from) | ||||||
| Transformations should be callable. More... | ||||||
Protected Member Functions | |
| getError () | |
Protected Attributes | |
| $data_factory | |
| $lng | |
| $is_ok | |
| $error | |
Definition at line 13 of file Constraint.php.
| ILIAS\Refinery\Custom\Constraint::__construct | ( | callable | $is_ok, |
| $error, | |||
| Data\Factory | $data_factory, | ||
| \ilLanguage | $lng | ||
| ) |
If $error is a callable it needs to take two parameters:
| string | callable | $error |
Definition at line 48 of file Constraint.php.
References ILIAS\Refinery\Custom\Constraint\$data_factory, ILIAS\Refinery\Custom\Constraint\$error, ILIAS\Refinery\Custom\Constraint\$is_ok, ILIAS\Refinery\Custom\Constraint\$lng, and error().
Here is the call graph for this function:
|
final |
Tells if the provided value complies.
| mixed | $value |
Implements ILIAS\Refinery\Constraint.
Definition at line 79 of file Constraint.php.
Referenced by ILIAS\Refinery\Custom\Constraint\check(), and ILIAS\Refinery\Custom\Constraint\problemWith().
Here is the caller graph for this function:
|
final |
Restricts a Result.Must do nothing with the result if $result->isError(). Must replace the result with an error according to problemWith() if !accepts($result->value()).
| Result | $result |
Implements ILIAS\Refinery\Constraint.
Definition at line 99 of file Constraint.php.
References ILIAS\Refinery\Custom\Constraint\$error, $result, ILIAS\Refinery\Custom\Constraint\problemWith(), and ILIAS\Data\Result\value().
Here is the call graph for this function:
|
final |
Checks the provided value.Should not throw if accepts($value).
UnexpectedValueException if value does not comply with encoded constraint.
| mixed | $value |
Implements ILIAS\Refinery\Constraint.
Definition at line 67 of file Constraint.php.
References ILIAS\Refinery\Custom\Constraint\accepts(), and ILIAS\Refinery\getErrorMessage().
Here is the call graph for this function:
|
protected |
Definition at line 59 of file Constraint.php.
References ILIAS\Refinery\Custom\Constraint\$error.
|
final |
Tells what the problem with the provided value is.Should return null if accepts($value).
| mixed | $value |
Implements ILIAS\Refinery\Constraint.
Definition at line 87 of file Constraint.php.
References ILIAS\Refinery\Custom\Constraint\accepts(), and ILIAS\Refinery\getErrorMessage().
Referenced by ILIAS\Refinery\Custom\Constraint\applyTo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 22 of file Constraint.php.
Referenced by ILIAS\Refinery\Custom\Constraint\__construct(), ILIAS\Refinery\IsNull\__construct(), ILIAS\Refinery\Numeric\IsNumeric\__construct(), ILIAS\Refinery\Password\HasLowerChars\__construct(), ILIAS\Refinery\Password\HasNumbers\__construct(), ILIAS\Refinery\Password\HasSpecialChars\__construct(), ILIAS\Refinery\Password\HasUpperChars\__construct(), ILIAS\Refinery\Integer\LessThan\__construct(), ILIAS\Refinery\String\HasMaxLength\__construct(), ILIAS\Refinery\Integer\GreaterThan\__construct(), ILIAS\Refinery\Password\HasMinLength\__construct(), and ILIAS\Refinery\String\HasMinLength\__construct().
|
protected |
Definition at line 37 of file Constraint.php.
Referenced by ILIAS\Refinery\Custom\Constraint\__construct(), ILIAS\Refinery\Custom\Constraint\applyTo(), and ILIAS\Refinery\Custom\Constraint\getError().
|
protected |
Definition at line 32 of file Constraint.php.
Referenced by ILIAS\Refinery\Custom\Constraint\__construct().
|
protected |
Definition at line 27 of file Constraint.php.
Referenced by ILIAS\Refinery\Custom\Constraint\__construct(), ILIAS\Refinery\IsNull\__construct(), ILIAS\Refinery\Numeric\IsNumeric\__construct(), ILIAS\Refinery\Password\HasLowerChars\__construct(), ILIAS\Refinery\Password\HasNumbers\__construct(), ILIAS\Refinery\Password\HasSpecialChars\__construct(), ILIAS\Refinery\Password\HasUpperChars\__construct(), ilAccessibilityDocumentCriterionAssignmentConstraint\__construct(), ilTermsOfServiceDocumentCriterionAssignmentConstraint\__construct(), ILIAS\Refinery\Integer\LessThan\__construct(), ILIAS\Refinery\String\HasMaxLength\__construct(), ILIAS\Refinery\Integer\GreaterThan\__construct(), ILIAS\Refinery\Password\HasMinLength\__construct(), and ILIAS\Refinery\String\HasMinLength\__construct().