ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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\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...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Protected Attributes

 $constraints
 
 $failed_constraint
 

Detailed Description

Definition at line 9 of file Sequential.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 24 of file Sequential.php.

References ILIAS\Refinery\Logical\Sequential\$constraints, $lng, $txt, and ILIAS\GlobalScreen\Provider\__construct().

25  {
26  $this->constraints = $constraints;
28  function ($value) {
29  foreach ($this->constraints as $key => $constraint) {
30  if (!$constraint->accepts($value)) {
31  $this->failed_constraint = $constraint;
32  return false;
33  }
34  }
35 
36  return true;
37  },
38  function ($txt, $value) {
39  return $this->failed_constraint->getErrorMessage($value);
40  },
41  $data_factory,
42  $lng
43  );
44  }
$lng
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Field Documentation

◆ $constraints

ILIAS\Refinery\Logical\Sequential::$constraints
protected

Definition at line 14 of file Sequential.php.

Referenced by ILIAS\Refinery\Logical\Sequential\__construct().

◆ $failed_constraint

ILIAS\Refinery\Logical\Sequential::$failed_constraint
protected

Definition at line 22 of file Sequential.php.


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