ILIAS  release_8 Revision v8.24
ILIAS\Refinery\Logical\LogicalOr Class Reference
+ Inheritance diagram for ILIAS\Refinery\Logical\LogicalOr:
+ Collaboration diagram for ILIAS\Refinery\Logical\LogicalOr:

Public Member Functions

 __construct (array $other, Data\Factory $data_factory, ilLanguage $lng)
 LogicalOr constructor. More...
 
- Public Member Functions inherited from ILIAS\Refinery\Constraint
 check ($value)
 Checks the provided value. More...
 
 accepts ($value)
 Tells if the provided value complies. More...
 
 problemWith ($value)
 Tells what the problem with the provided value is. More...
 
 applyTo (Result $result)
 Restricts a Result. More...
 
 withProblemBuilder (callable $builder)
 Get a constraint like this one with a builder for a custom error message. More...
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 transform ($from)
 Perform the transformation. More...
 
 applyTo (Result $result)
 Perform the transformation and reify possible failures. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Detailed Description

Definition at line 27 of file LogicalOr.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Logical\LogicalOr::__construct ( array  $other,
Data\Factory  $data_factory,
ilLanguage  $lng 
)

LogicalOr constructor.

Parameters
Constraint[]$other
Data\Factory$data_factory
ilLanguage$lng

Definition at line 35 of file LogicalOr.php.

36 {
38 static function ($value) use ($other): bool {
39 foreach ($other as $constraint) {
40 if ($constraint->accepts($value)) {
41 return true;
42 }
43 }
44
45 return false;
46 },
47 static function ($value) use ($other): string {
48 $problems = [];
49
50 foreach ($other as $constraint) {
51 $problems[] = $constraint->getErrorMessage($value);
52 }
53
54 return 'Please fix one of these: ' . implode(', ', array_filter($problems));
55 },
56 $data_factory,
57 $lng
58 );
59 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$lng

References $lng, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: