ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Refinery\Logical\Sequential Class Reference
+ Inheritance diagram for ILIAS\Refinery\Logical\Sequential:
+ Collaboration diagram for ILIAS\Refinery\Logical\Sequential:

Public Member Functions

 __construct (array $constraints, Data\Factory $data_factory, ilLanguage $lng)
 
- Public Member Functions inherited from ILIAS\Refinery\Custom\Constraint
 __construct (callable $is_ok, $error, Data\Factory $data_factory, ilLanguage $lng)
 If $error is a callable it needs to take two parameters: More...
 
 check ($value)
 
 accepts ($value)
 
 problemWith ($value)
 
 applyTo (Result $result)
 
- Public Member Functions inherited from ILIAS\Refinery\Constraint
 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...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Private Attributes

Constraint $failed_constraint
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\Refinery\Custom\Constraint
 getError ()
 
- Protected Attributes inherited from ILIAS\Refinery\Custom\Constraint
Data Factory $data_factory
 
ilLanguage $lng
 
 $is_ok
 
 $error
 

Detailed Description

Definition at line 28 of file Sequential.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Logical\Sequential::__construct ( array  $constraints,
Data\Factory  $data_factory,
ilLanguage  $lng 
)
Parameters
Constraint[]$constraints
Data\Factory$data_factory
ilLanguage$lng

Definition at line 43 of file Sequential.php.

References ILIAS\Refinery\Custom\Constraint\$data_factory, ILIAS\Refinery\Custom\Constraint\$lng, $txt, and ILIAS\GlobalScreen\Provider\__construct().

44  {
46  function ($value) use ($constraints): bool {
47  foreach ($constraints as $constraint) {
48  if (!$constraint->accepts($value)) {
49  $this->failed_constraint = $constraint;
50  return false;
51  }
52  }
53 
54  return true;
55  },
56  function ($txt, $value): string {
57  return $this->failed_constraint->getErrorMessage($value);
58  },
60  $lng
61  );
62  }
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Field Documentation

◆ $failed_constraint

Constraint ILIAS\Refinery\Logical\Sequential::$failed_constraint
private

Definition at line 36 of file Sequential.php.


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