32 public function ok($value)
34 return new Result\Ok($value);
45 return new Result\Error(
$e);
57 if (!$this->colorfactory) {
58 $this->colorfactory =
new Color\Factory();
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);
color($value)
Color is a data type representing a color in HTML.
error($e)
Get an error result.
order(string $subject, $direction)
A password is used as part of credentials for authentication.
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. ...
$colorfactory
cache for color factory.
positiveInteger(int $value)
The scope of this class is split ilias-conform URI's into components.
password($pass)
Get a password.
clientId(string $clientId)
range(int $start, int $length)
ok($value)
Get an ok result.
uri($uri_string)
Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters ...
A simple class to express a naive range of whole positive numbers.