ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\Data\Factory Class Reference

Builds data types. More...

+ 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...
 
 clientId ($clientId)
 

Private Attributes

 $colorfactory
 cache for color factory. More...
 

Detailed Description

Member Function Documentation

◆ clientId()

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

Definition at line 62 of file Factory.php.

References League\OAuth2\Client\Provider\$clientId.

63  {
64  return new ClientId($clientId);
65  }

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

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: