Definition at line 27 of file ByTrying.php.
◆ __construct()
| ILIAS\Refinery\ByTrying::__construct |
( |
private array |
$transformations, |
|
|
private Data\Factory |
$data_factory, |
|
|
protected ?ilLanguage |
$lng = null |
|
) |
| |
- Parameters
-
| Transformation[] | $transformations |
| Data\Factory | $data_factory | |
Definition at line 40 of file ByTrying.php.
47 $this->transformations = $transformations;
48 $this->data_factory = $data_factory;
49 $this->error =
static function ():
void {
50 throw new ConstraintViolationException(
51 'no valid constraints',
52 'no_valid_constraints'
◆ getError()
| ILIAS\Refinery\ByTrying::getError |
( |
| ) |
|
|
protected |
◆ transform()
| ILIAS\Refinery\ByTrying::transform |
( |
|
$from | ) |
|
Implements ILIAS\Refinery\Transformation.
Definition at line 68 of file ByTrying.php.
References ILIAS\Refinery\getErrorMessage().
70 foreach ($this->transformations as $transformation) {
71 $result = $this->data_factory->ok($from);
72 $result = $transformation->applyTo($result);
73 if ($result->isOK()) {
74 return $result->value();
getErrorMessage($value)
Get the problem message.
◆ $error
| ILIAS\Refinery\ByTrying::$error |
|
private |
The documentation for this class was generated from the following file: