ILIAS  release_8 Revision v8.24
Group.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\Refinery\Custom;
22
24use ilLanguage;
25use ILIAS\Refinery\Constraint as ConstraintInterface;
26use ILIAS\Refinery\Transformation as TransformationInterface;
27
28class Group
29{
32
34 {
35 $this->dataFactory = $dataFactory;
36 $this->language = $language;
37 }
38
44 public function constraint(callable $callable, $error): ConstraintInterface
45 {
46 return new Constraint(
47 $callable,
48 $error,
49 $this->dataFactory,
50 $this->language
51 );
52 }
53
54 public function transformation(callable $transform): TransformationInterface
55 {
56 return new Transformation($transform);
57 }
58}
Builds data types.
Definition: Factory.php:21
__construct(Factory $dataFactory, ilLanguage $language)
Definition: Group.php:33
constraint(callable $callable, $error)
Definition: Group.php:44
transformation(callable $transform)
Definition: Group.php:54
Transform values according to custom configuration.
ilErrorHandling $error
Definition: class.ilias.php:55
language handling
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Constraint.php:21