ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Group.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Refinery\Custom;
22
24use ILIAS\Refinery\Constraint as ConstraintInterface;
25use ILIAS\Refinery\Transformation as TransformationInterface;
26
27class Group
28{
30 private \ILIAS\Language\Language $language;
31
33 {
34 $this->dataFactory = $dataFactory;
35 $this->language = $language;
36 }
37
43 public function constraint(callable $callable, $error): ConstraintInterface
44 {
45 return new Constraint(
46 $callable,
47 $error,
48 $this->dataFactory,
49 $this->language
50 );
51 }
52
53 public function transformation(callable $transform): TransformationInterface
54 {
55 return new Transformation($transform);
56 }
57}
Builds data types.
Definition: Factory.php:36
constraint(callable $callable, $error)
Definition: Group.php:43
transformation(callable $transform)
Definition: Group.php:53
ILIAS Language Language $language
Definition: Group.php:30
__construct(Factory $dataFactory, \ILIAS\Language\Language $language)
Definition: Group.php:32
Transform values according to custom configuration.
ilErrorHandling $error
Definition: class.ilias.php:69
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
A transformation is a function from one datatype to another.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.