ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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, \ILIAS\Language\Language $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 26 of file LogicalOr.php.

Constructor & Destructor Documentation

◆ __construct()

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

LogicalOr constructor.

Parameters
Constraint[]$other
Data\Factory$data_factory
\ILIAS\Language\Language$lng

Definition at line 34 of file LogicalOr.php.

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

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: