3declare(strict_types=1);
57 if (!$this->colorfactory) {
60 return $this->colorfactory->build($value);
68 public function uri(
string $uri_string):
URI
70 return new URI($uri_string);
82 if (is_string($size)) {
84 if (!preg_match(
"/(\d+)\s*([a-zA-Z]+)/", $size, $match)) {
85 throw new \InvalidArgumentException(
"'$size' can't be interpreted as data size.");
87 return $this->
dataSize((
int) $match[1], $match[2]);
90 throw new \InvalidArgumentException(
91 "Expected second argument to be a unit for data, '$unit' is unknown."
95 return new DataSize($size * $unit_size, $unit_size);
139 return new Range($start, $length);
145 public function order(
string $subject,
string $direction):
Order
147 return new Order($subject, $direction);
171 if (!$this->dimensionfactory) {
180 public function dataset(array $dimensions): Chart\Dataset
Builds a Color from either hex- or rgb values.
Color expresses a certain color by giving the mixing ratio in the RGB color space.
This class provides the data size with additional information to remove the work to calculate the siz...
static array $abbreviations
positiveInteger(int $value)
Dimension Factory $dimensionfactory
Color Factory $colorfactory
cache for color factory.
color($value)
Color is a data type representing a color in HTML.
dataset(array $dimensions)
range(int $start, int $length)
clientId(string $clientId)
link(string $label, URI $url)
dataSize($size, string $unit=null)
Represents the size of some data.
order(string $subject, string $direction)
ok($value)
Get an ok result.
error($e)
Get an error result.
uri(string $uri_string)
Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters ...
A Link is the often used combination of a label and an URL.
Both the subject and the direction need to be specified when expressing an order.
A password is used as part of credentials for authentication.
A simple class to express a range of whole positive numbers.
A result encapsulates a value or an error and simplifies the handling of those.
A result encapsulates a value or an error and simplifies the handling of those.
The scope of this class is split ilias-conform URI's into components.
A version number that consists of three numbers (major, minor, patch).
A result encapsulates a value or an error and simplifies the handling of those.