|
| __construct (Factory $dataFactory) |
|
| string () |
| Returns an object that allows to transform a value to a string value. More...
|
|
| int () |
| Returns an object that allows to transform a value to an integer value. More...
|
|
| float () |
| Returns an object that allows to transform a value to a float value. More...
|
|
| bool () |
| Returns an object that allows to transform a value to a boolean value. More...
|
|
| listOf (Transformation $transformation) |
| Returns an object that allows to transform an value in a given array with the given transformation object. More...
|
|
| dictOf (Transformation $transformation) |
| Returns an object that allows to transform the values of an associative array with the given transformation object. More...
|
|
| tupleOf (array $transformation) |
| Returns an object that allows to transform the values of an array with the given array of transformations objects. More...
|
|
| recordOf (array $transformations) |
| Returns an object that allows to transform the values of an associative array with the given associative array of transformations objects. More...
|
|
| toNew ($classNameOrArray) |
| Returns either an transformation object to create objects of an existing class, with variations of constructor parameters OR returns an transformation object to execute a certain method with variation of parameters on the objects. More...
|
|
| data (string $dataType) |
|
| dateTime () |
|
Definition at line 38 of file Group.php.
◆ __construct()
ILIAS\Refinery\To\Group::__construct |
( |
Factory |
$dataFactory | ) |
|
◆ bool()
ILIAS\Refinery\To\Group::bool |
( |
| ) |
|
Returns an object that allows to transform a value to a boolean value.
Definition at line 78 of file Group.php.
80 return new BooleanTransformation();
◆ data()
ILIAS\Refinery\To\Group::data |
( |
string |
$dataType | ) |
|
- Parameters
-
string | $dataType | - Name of the data type, this value MUST much with the methods provided by the \ILIAS\Data\Factory |
- Returns
- Transformation
Definition at line 173 of file Group.php.
References ILIAS\Refinery\To\Group\toNew().
175 return $this->
toNew([$this->dataFactory, $dataType]);
toNew($classNameOrArray)
Returns either an transformation object to create objects of an existing class, with variations of co...
◆ dateTime()
ILIAS\Refinery\To\Group::dateTime |
( |
| ) |
|
Definition at line 178 of file Group.php.
180 return new DateTimeTransformation();
◆ dictOf()
Returns an object that allows to transform the values of an associative array with the given transformation object.
The keys of an associative array MUST be of type String
Using ILIAS\Refinery\Factory::to()
will check if the value is identical to the value after the transformation.
Definition at line 104 of file Group.php.
106 return new DictionaryTransformation($transformation);
◆ float()
ILIAS\Refinery\To\Group::float |
( |
| ) |
|
Returns an object that allows to transform a value to a float value.
Definition at line 69 of file Group.php.
71 return new FloatTransformation();
◆ int()
ILIAS\Refinery\To\Group::int |
( |
| ) |
|
Returns an object that allows to transform a value to an integer value.
Definition at line 60 of file Group.php.
62 return new IntegerTransformation();
◆ listOf()
Returns an object that allows to transform an value in a given array with the given transformation object.
The transformation will be executed on every element of the array.
Using ILIAS\Refinery\Factory::to()
will check if the value is identical to the value after the transformation.
Definition at line 91 of file Group.php.
93 return new ListTransformation($transformation);
◆ recordOf()
ILIAS\Refinery\To\Group::recordOf |
( |
array |
$transformations | ) |
|
Returns an object that allows to transform the values of an associative array with the given associative array of transformations objects.
The length of the array of transformations MUST be identical to the array of values to transform. The keys of the transformation array will be the same as the key from the value array e.g. Transformation with the key "hello" will transform value with the key "hello" of the value array.
Using ILIAS\Refinery\Factory::to()
will check if the value is identical to the value after the transformation.
- Parameters
-
array<string,Transformation> | $transformations |
- Returns
- Transformation
Definition at line 144 of file Group.php.
146 return new RecordTransformation($transformations);
◆ string()
ILIAS\Refinery\To\Group::string |
( |
| ) |
|
Returns an object that allows to transform a value to a string value.
Definition at line 51 of file Group.php.
53 return new StringTransformation();
◆ toNew()
ILIAS\Refinery\To\Group::toNew |
( |
|
$classNameOrArray | ) |
|
Returns either an transformation object to create objects of an existing class, with variations of constructor parameters OR returns an transformation object to execute a certain method with variation of parameters on the objects.
- Parameters
-
string|array{0 | object, 1: string} $classNameOrArray |
- Returns
- Transformation
Definition at line 157 of file Group.php.
Referenced by ILIAS\Refinery\To\Group\data().
159 if (is_array($classNameOrArray)) {
160 if (2 !== count($classNameOrArray)) {
163 return new NewMethodTransformation($classNameOrArray[0], $classNameOrArray[1]);
165 return new NewObjectTransformation($classNameOrArray);
◆ tupleOf()
ILIAS\Refinery\To\Group::tupleOf |
( |
array |
$transformation | ) |
|
Returns an object that allows to transform the values of an array with the given array of transformations objects.
The length of the array of transformations MUST be identical to the array of values to transform. The keys of the transformation array will be the same as the key from the value array e.g. Transformation on position 2 will transform value on position 2 of the value array.
Using ILIAS\Refinery\Factory::to()
will check if the value is identical to the value after the transformation.
- Parameters
-
Transformation[] | $transformation |
- Returns
- Transformation
Definition at line 123 of file Group.php.
125 return new TupleTransformation($transformation);
◆ $dataFactory
Factory ILIAS\Refinery\To\Group::$dataFactory |
|
private |
The documentation for this class was generated from the following file: