3 declare(strict_types=1);
52 return new Result\Ok($value);
63 return new Result\Error(
$e);
74 if (!$this->colorfactory) {
75 $this->colorfactory =
new Color\Factory();
77 return $this->colorfactory->build($value);
85 public function uri(
string $uri_string):
URI 87 return new URI($uri_string);
99 if (is_string($size)) {
101 if (!preg_match(
"/(\d+)\s*([a-zA-Z]+)/", $size, $match)) {
102 throw new \InvalidArgumentException(
"'$size' can't be interpreted as data size.");
104 return $this->
dataSize((
int) $match[1], $match[2]);
107 throw new \InvalidArgumentException(
108 "Expected second argument to be a unit for data, '$unit' is unknown." 112 return new DataSize($size * $unit_size, $unit_size);
156 return new Range($start, $length);
162 public function order(
string $subject,
string $direction):
Order 164 return new Order($subject, $direction);
178 return new Link($label, $url);
188 if (!$this->dimensionfactory) {
197 public function dataset(array $dimensions): Chart\Dataset
204 if (null === $this->html_metadata_factory) {
213 if (null === $this->open_graph_metadata_factory) {
color($value)
Color is a data type representing a color in HTML.
dataset(array $dimensions)
A Link is the often used combination of a label and an URL.
languageTag(string $language_tag)
Color expresses a certain color by giving the mixing ratio in the RGB color space.
Meta Html OpenGraph Factory $open_graph_metadata_factory
static fromString(string $string)
error($e)
Get an error result.
This class provides the data size with additional information to remove the work to calculate the siz...
A result encapsulates a value or an error and simplifies the handling of those.
A password is used as part of credentials for authentication.
This class represents a valid language tag that should be used instead of plain strings.
dataSize($size, string $unit=null)
Represents the size of some data.
Both the subject and the direction need to be specified when expressing an order. ...
static array $abbreviations
positiveInteger(int $value)
Meta Html Factory $html_metadata_factory
link(string $label, URI $url)
Dimension Factory $dimensionfactory
The scope of this class is split ilias-conform URI's into components.
Color Factory $colorfactory
cache for color factory.
uri(string $uri_string)
Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters ...
clientId(string $clientId)
range(int $start, int $length)
order(string $subject, string $direction)
ok($value)
Get an ok result.
A version number that consists of three numbers (major, minor, patch).
A simple class to express a range of whole positive numbers.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...