3declare(strict_types=1);
75 final public function check($value)
87 final public function accepts($value): bool
89 return call_user_func($this->is_ok, $value);
114 if ($problem !==
null) {
115 $error = $this->data_factory->error($problem);
Data Factory $data_factory
accepts($value)
@inheritDoc
__construct(callable $is_ok, $error, Data\Factory $data_factory, ilLanguage $lng)
If $error is a callable it needs to take two parameters:
applyTo(Result $result)
@inheritDoc
problemWith($value)
@inheritDoc
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getErrorMessage($value)
Get the problem message.
trait DeriveTransformFromApplyTo
trait DeriveInvokeFromTransform