3 declare(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);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
value()
Get the encapsulated value.
isError()
Get to know if the result is an error.
A result encapsulates a value or an error and simplifies the handling of those.
trait DeriveTransformFromApplyTo
trait DeriveInvokeFromTransform
Data Factory $data_factory
__construct(callable $is_ok, $error, Data\Factory $data_factory, ilLanguage $lng)
If $error is a callable it needs to take two parameters:
getErrorMessage($value)
Get the problem message.