ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
Constraint.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Refinery
;
22
23
use
ILIAS\Data\Result
;
24
use
UnexpectedValueException
;
25
31
interface
Constraint
extends
Transformation
32
{
42
public
function
check
($value);
43
50
public
function
accepts
($value): bool;
51
60
public
function
problemWith
($value): ?string;
61
72
public
function
applyTo
(
Result
$result):
Result
;
73
87
public
function
withProblemBuilder
(callable $builder):
self
;
88
}
ILIAS\Data\Result
Definition:
Error.php:21
ILIAS\AdvancedMetaData\Services\ObjectModes\Custom\Custom\Constraint\problemWith
problemWith($value)
Definition:
Constraint.php:94
ILIAS\Refinery
Definition:
ByTrying.php:21
ILIAS\Refinery\Constraint\withProblemBuilder
withProblemBuilder(callable $builder)
Get a constraint like this one with a builder for a custom error message.
ILIAS\Refinery\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:31
UnexpectedValueException
ILIAS\AdvancedMetaData\Services\ObjectModes\Custom\Custom\Constraint\applyTo
applyTo(Result $result)
Definition:
Constraint.php:106
ILIAS\AdvancedMetaData\Services\ObjectModes\Custom\Custom\Constraint\check
check($value)
Definition:
Constraint.php:74
ILIAS\Refinery\Transformation
A transformation is a function from one datatype to another.
Definition:
Transformation.php:34
WrapperInterface
ILIAS\AdvancedMetaData\Services\ObjectModes\Custom\Custom\Constraint\accepts
accepts($value)
Definition:
Constraint.php:86
components
ILIAS
Refinery
src
Constraint.php
Generated on Sun Aug 31 2025 23:03:31 for ILIAS by
1.8.13 (using
Doxyfile
)