19declare(strict_types=1);
37 protected \ILIAS\Language\Language
$lng;
74 final public function check($value)
86 final public function accepts($value): bool
88 return call_user_func($this->is_ok, $value);
113 if ($problem !==
null) {
114 $error = $this->data_factory->error($problem);
__construct(callable $is_ok, $error, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
If $error is a callable it needs to take two parameters:
ILIAS Language Language $lng
Data Factory $data_factory
accepts($value)
@inheritDoc
applyTo(Result $result)
@inheritDoc
problemWith($value)
@inheritDoc
trait DeriveInvokeFromTransform
trait DeriveTransformFromApplyTo
A result encapsulates a value or an error and simplifies the handling of those.
isError()
Get to know if the result is an error.
value()
Get the encapsulated value.
A constraint encodes some resrtictions on values.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.