6use ILIAS\Data\Interval\OpenedFloatInterval;
7use ILIAS\Data\Interval\OpenedIntegerInterval;
8use ILIAS\Data\Interval\ClosedFloatInterval;
9use ILIAS\Data\Interval\ClosedIntegerInterval;
32 public function ok($value)
57 if (!$this->colorfactory) {
60 return $this->colorfactory->build($value);
71 public function uri($uri_string)
73 return new URI($uri_string);
85 if (is_string(
$size)) {
87 if (!preg_match(
"/(\d+)\s*([a-zA-Z]+)/",
$size, $match)) {
88 throw \InvalidArgumentException(
"'$size' can't be interpreted as data size.");
90 return $this->
dataSize((
int) $match[1], $match[2]);
93 throw new \InvalidArgumentException(
94 "Expected second argument to be a unit for data, '$unit' is unknown."
165 return new Range($start, $length);
173 return new Order($subject, $direction);
An exception for terminatinating execution or to throw for unit testing.
Builds a Color from either hex- or rgb values.
positiveInteger(int $value)
color($value)
Color is a data type representing a color in HTML.
$colorfactory
cache for color factory.
range(int $start, int $length)
clientId(string $clientId)
uri($uri_string)
Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters ...
order(string $subject, $direction)
dataSize($size, string $unit=null)
Represents the size of some data.
ok($value)
Get an ok result.
error($e)
Get an error result.
password($pass)
Get a password.
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 naive 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.