ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\Data\Factory Class Reference

Builds data types. More...

+ Inheritance diagram for ILIAS\Data\Factory:
+ Collaboration diagram for ILIAS\Data\Factory:

Public Member Functions

 ok ($value)
 Get an ok result. More...
 
 error ($e)
 Get an error result. More...
 
 color ($value)
 Color is a data type representing a color in HTML. More...
 
 uri ($uri_string)
 Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters and obliagtory parts. More...
 
 password ($pass)
 Get a password. More...
 
 clientId (string $clientId)
 

Private Attributes

 $colorfactory
 cache for color factory. More...
 

Detailed Description

Member Function Documentation

◆ clientId()

ILIAS\Data\Factory::clientId ( string  $clientId)
Parameters
string$clientId
Returns
ClientId

Definition at line 85 of file Factory.php.

85 : ClientId
86 {
87 return new ClientId($clientId);
88 }
if(array_key_exists('provider', $_GET)) elseif(array_key_exists( 'provider', $_SESSION)) if(!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) $clientId

References PHPMailer\PHPMailer\$clientId.

◆ color()

ILIAS\Data\Factory::color (   $value)

Color is a data type representing a color in HTML.

Construct a color with a hex-value or list of RGB-values.

Parameters
string | int[]$value
Returns
Color

Definition at line 50 of file Factory.php.

51 {
52 if (!$this->colorfactory) {
53 $this->colorfactory = new Color\Factory();
54 }
55 return $this->colorfactory->build($value);
56 }

◆ error()

ILIAS\Data\Factory::error (   $e)

Get an error result.

Parameters
string | \Exception$error
Returns
Result

Definition at line 38 of file Factory.php.

39 {
40 return new Result\Error($e);
41 }

◆ ok()

ILIAS\Data\Factory::ok (   $value)

Get an ok result.

Parameters
mixed$value
Returns
Result

Definition at line 27 of file Factory.php.

28 {
29 return new Result\Ok($value);
30 }

◆ password()

ILIAS\Data\Factory::password (   $pass)

Get a password.

Parameters
string
Returns
Password

Definition at line 76 of file Factory.php.

77 {
78 return new Password($pass);
79 }

References $pass.

◆ uri()

ILIAS\Data\Factory::uri (   $uri_string)

Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters and obliagtory parts.

Parameters
string$uri_string
Returns
URI

Definition at line 65 of file Factory.php.

66 {
67 return new URI($uri_string);
68 }

Field Documentation

◆ $colorfactory

ILIAS\Data\Factory::$colorfactory
private

cache for color factory.

Definition at line 19 of file Factory.php.


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