ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
DeriveTransformWithProblem.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Refinery
;
22
23
use
UnexpectedValueException
;
24
30
trait
DeriveTransformWithProblem
31
{
32
use
DeriveApplyToFromTransform
;
33
use
DeriveInvokeFromTransform
;
34
use
ProblemBuilder
;
35
36
public
function
transform
($from)
37
{
38
$this->
check
($from);
39
return
$from;
40
}
41
42
public
function
check
($value)
43
{
44
if
(!$this->accepts($value)) {
45
throw
new
UnexpectedValueException
($this->
getErrorMessage
($value));
46
}
47
}
48
49
public
function
problemWith
($value): ?string
50
{
51
if
(!$this->accepts($value)) {
52
return
$this->
getErrorMessage
($value);
53
}
54
55
return
null
;
56
}
57
}
ILIAS\Refinery\transform
transform($from)
Definition:
DeriveTransformWithProblem.php:36
ILIAS\Refinery
Definition:
ByTrying.php:21
ILIAS\Refinery\DeriveInvokeFromTransform
trait DeriveInvokeFromTransform
Definition:
DeriveInvokeFromTransform.php:24
ILIAS\Refinery\DeriveApplyToFromTransform
trait DeriveApplyToFromTransform
Definition:
DeriveApplyToFromTransform.php:29
UnexpectedValueException
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\Refinery\problemWith
problemWith($value)
Definition:
DeriveTransformWithProblem.php:49
DeriveTransformWithProblem
ILIAS\Refinery\getErrorMessage
getErrorMessage($value)
Definition:
ProblemBuilder.php:39
ILIAS\Refinery\ProblemBuilder
trait ProblemBuilder
Definition:
ProblemBuilder.php:26
ILIAS\Refinery\check
check($value)
Definition:
DeriveTransformWithProblem.php:42
components
ILIAS
Refinery
src
DeriveTransformWithProblem.php
Generated on Sun Aug 31 2025 23:03:31 for ILIAS by
1.8.13 (using
Doxyfile
)