ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Refinery\Factory Class Reference
+ Collaboration diagram for ILIAS\Refinery\Factory:

Public Member Functions

 __construct (\ILIAS\Data\Factory $dataFactory, \ILIAS\Language\Language $language)
 
 to ()
 Combined validations and transformations for primitive data types that establish a baseline for further constraints and more complex transformations. More...
 
 kindlyTo ()
 Combined validations and transformations for primitive data types that establish a baseline for further constraints and more complex transformations. More...
 
 in ()
 Creates a factory object to create a transformation object, that can be used to execute other transformation objects in a desired order. More...
 
 int ()
 Contains constraints and transformations on numbers. More...
 
 string ()
 Contains constraints for string. More...
 
 custom ()
 Contains constraints and transformations for custom functions. More...
 
 container ()
 Contains constraints for container types (e.g. More...
 
 password ()
 Contains constraints for password strings. More...
 
 logical ()
 Contains constraints for logical compositions with other constraints. More...
 
 null ()
 Contains constraints for null types. More...
 
 numeric ()
 Contains constraints for numeric data types. More...
 
 dateTime ()
 Contains transformations for DateTime. More...
 
 uri ()
 Contains transformations for Data. More...
 
 encode ()
 
 byTrying (array $transformations)
 Accepts Transformations and uses first successful one. More...
 
 random ()
 
 identity ()
 
 always ($value)
 
 executable ()
 

Private Attributes

ILIAS Data Factory $dataFactory
 
ILIAS Language Language $language
 

Detailed Description

Definition at line 25 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Factory::__construct ( \ILIAS\Data\Factory  $dataFactory,
\ILIAS\Language\Language  $language 
)

Definition at line 30 of file Factory.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

31  {
32  $this->dataFactory = $dataFactory;
33  $this->language = $language;
34 
35  $this->language->loadLanguageModule('validation');
36  }
ILIAS Data Factory $dataFactory
Definition: Factory.php:27
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
ILIAS Language Language $language
Definition: Factory.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ always()

ILIAS\Refinery\Factory::always (   $value)

Definition at line 176 of file Factory.php.

176  : Transformation
177  {
178  return new ConstantTransformation($value);
179  }

◆ byTrying()

ILIAS\Refinery\Factory::byTrying ( array  $transformations)

Accepts Transformations and uses first successful one.

Parameters
Transformation[]$transformations

Definition at line 161 of file Factory.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

161  : ByTrying
162  {
163  return new ByTrying($transformations, $this->dataFactory, $this->language);
164  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ container()

ILIAS\Refinery\Factory::container ( )

Contains constraints for container types (e.g.

arrays)

Definition at line 99 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

100  {
101  return new Container\Group($this->dataFactory);
102  }

◆ custom()

ILIAS\Refinery\Factory::custom ( )

Contains constraints and transformations for custom functions.

Definition at line 91 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

91  : Custom\Group
92  {
93  return new Custom\Group($this->dataFactory, $this->language);
94  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ dateTime()

ILIAS\Refinery\Factory::dateTime ( )

Contains transformations for DateTime.

Definition at line 139 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

◆ encode()

ILIAS\Refinery\Factory::encode ( )

Definition at line 152 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

152  : Encode\Group
153  {
154  return new Encode\Group();
155  }

◆ executable()

ILIAS\Refinery\Factory::executable ( )

Definition at line 181 of file Factory.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

181  : Transformation
182  {
183  return new IsExecutableTransformation($this->language);
184  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ identity()

ILIAS\Refinery\Factory::identity ( )

Definition at line 171 of file Factory.php.

171  : Transformation
172  {
173  return new IdentityTransformation();
174  }

◆ in()

ILIAS\Refinery\Factory::in ( )

Creates a factory object to create a transformation object, that can be used to execute other transformation objects in a desired order.

Definition at line 66 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

Referenced by ILIAS\Refinery\Factory\int().

66  : In\Group
67  {
68  return new In\Group();
69  }
+ Here is the caller graph for this function:

◆ int()

ILIAS\Refinery\Factory::int ( )

Contains constraints and transformations on numbers.

Each constraint on an int will attempt to transform to int as well.

Definition at line 75 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, ILIAS\Refinery\Factory\in(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

76  {
77  return new Integer\Group($this->dataFactory, $this->language, $this->in());
78  }
in()
Creates a factory object to create a transformation object, that can be used to execute other transfo...
Definition: Factory.php:66
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ kindlyTo()

ILIAS\Refinery\Factory::kindlyTo ( )

Combined validations and transformations for primitive data types that establish a baseline for further constraints and more complex transformations.

Other then the to-group, the kindlyTo transformation attempts to implement Postels Law by being reasonably liberal when interpreting data. Look into the various transformations in the group for detailed information what works exactly.

Definition at line 56 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

Referenced by ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement\__construct(), ilObjGroupGUI\_goto(), and ilObjCourseGUI\_goto().

57  {
58  return new KindlyTo\Group($this->dataFactory);
59  }
+ Here is the caller graph for this function:

◆ logical()

ILIAS\Refinery\Factory::logical ( )

Contains constraints for logical compositions with other constraints.

Definition at line 115 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

115  : Logical\Group
116  {
117  return new Logical\Group($this->dataFactory, $this->language);
118  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ null()

ILIAS\Refinery\Factory::null ( )

Contains constraints for null types.

Definition at line 123 of file Factory.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

123  : Constraint
124  {
125  return new IsNull($this->dataFactory, $this->language);
126  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ numeric()

ILIAS\Refinery\Factory::numeric ( )

Contains constraints for numeric data types.

Definition at line 131 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

131  : Numeric\Group
132  {
133  return new Numeric\Group($this->dataFactory, $this->language);
134  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ password()

ILIAS\Refinery\Factory::password ( )

Contains constraints for password strings.

Definition at line 107 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

108  {
109  return new Password\Group($this->dataFactory, $this->language);
110  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ random()

ILIAS\Refinery\Factory::random ( )

Definition at line 166 of file Factory.php.

166  : RandomGroup
167  {
168  return new RandomGroup();
169  }

◆ string()

ILIAS\Refinery\Factory::string ( )

Contains constraints for string.

Definition at line 83 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

83  : String\Group
84  {
85  return new String\Group($this->dataFactory, $this->language);
86  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ to()

ILIAS\Refinery\Factory::to ( )

Combined validations and transformations for primitive data types that establish a baseline for further constraints and more complex transformations.

Definition at line 42 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by ILIAS\StaticURL\Request\StaticURLRequestBuilder\buildRequest(), and ILIAS\StaticURL\Request\LegacyRequestBuilder\buildRequest().

42  : To\Group
43  {
44  return new To\Group($this->dataFactory, $this->language);
45  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ uri()

ILIAS\Refinery\Factory::uri ( )

Contains transformations for Data.

Definition at line 147 of file Factory.php.

References ILIAS\ILIASObject\Creation\Group.

147  : URI\Group
148  {
149  return new URI\Group();
150  }

Field Documentation

◆ $dataFactory

ILIAS Data Factory ILIAS\Refinery\Factory::$dataFactory
private

Definition at line 27 of file Factory.php.

◆ $language

ILIAS Language Language ILIAS\Refinery\Factory::$language
private

Definition at line 28 of file Factory.php.


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