ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ILIAS\Refinery\Factory Class Reference
+ Collaboration diagram for ILIAS\Refinery\Factory:

Public Member Functions

 __construct (\ILIAS\Data\Factory $dataFactory, \ilLanguage $language)
 
 to ()
 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...
 

Private Attributes

 $dataFactory
 
 $language
 

Detailed Description

Definition at line 15 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 31 of file Factory.php.

References language().

32  {
33  $this->dataFactory = $dataFactory;
34  $this->language = $language;
35 
36  $this->language->loadLanguageModule('validation');
37  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ container()

ILIAS\Refinery\Factory::container ( )

Contains constraints for container types (e.g.

arrays)

Returns
Container

Definition at line 98 of file Factory.php.

References language().

99  {
100  return new Container\Group($this->dataFactory, $this->language);
101  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ custom()

ILIAS\Refinery\Factory::custom ( )

Contains constraints and transformations for custom functions.

Returns
Custom

Definition at line 88 of file Factory.php.

References language().

88  : Custom\Group
89  {
90  return new Custom\Group($this->dataFactory, $this->language);
91  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ dateTime()

ILIAS\Refinery\Factory::dateTime ( )

Contains transformations for DateTime.

Returns
DateTime

Definition at line 148 of file Factory.php.

149  {
150  return new DateTime\Group();
151  }

◆ 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.

Returns
In

Definition at line 57 of file Factory.php.

57  : In\Group
58  {
59  return new In\Group();
60  }

◆ int()

ILIAS\Refinery\Factory::int ( )

Contains constraints and transformations on numbers.

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

Returns
Integer

Definition at line 68 of file Factory.php.

References language().

68  : Integer\Group
69  {
70  return new Integer\Group($this->dataFactory, $this->language);
71  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ logical()

ILIAS\Refinery\Factory::logical ( )

Contains constraints for logical compositions with other constraints.

Returns
Logical

Definition at line 118 of file Factory.php.

References language().

119  {
120  return new Logical\Group($this->dataFactory, $this->language);
121  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ null()

ILIAS\Refinery\Factory::null ( )

Contains constraints for null types.

Returns
IsNull

Definition at line 128 of file Factory.php.

References language().

129  {
130  return new IsNull($this->dataFactory, $this->language);
131  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ numeric()

ILIAS\Refinery\Factory::numeric ( )

Contains constraints for numeric data types.

Returns
Numeric

Definition at line 138 of file Factory.php.

References language().

139  {
140  return new Numeric\Group($this->dataFactory, $this->language);
141  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ password()

ILIAS\Refinery\Factory::password ( )

Contains constraints for password strings.

Returns
Password

Definition at line 108 of file Factory.php.

References language().

109  {
110  return new Password\Group($this->dataFactory, $this->language);
111  }
language()
Definition: language.php:2
+ Here is the call graph for this function:

◆ string()

ILIAS\Refinery\Factory::string ( )

Contains constraints for string.

Returns
String

Definition at line 78 of file Factory.php.

References language().

78  : String\Group
79  {
80  return new String\Group($this->dataFactory, $this->language);
81  }
language()
Definition: language.php:2
+ 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.

Returns
To

Definition at line 45 of file Factory.php.

45  : To\Group
46  {
47  return new To\Group($this->dataFactory);
48  }

◆ uri()

ILIAS\Refinery\Factory::uri ( )

Contains transformations for Data.

Returns
URI

Definition at line 158 of file Factory.php.

158  : URI\Group
159  {
160  return new URI\Group();
161  }

Field Documentation

◆ $dataFactory

ILIAS\Refinery\Factory::$dataFactory
private

Definition at line 20 of file Factory.php.

◆ $language

ILIAS\Refinery\Factory::$language
private

Definition at line 25 of file Factory.php.


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