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."
color($value)
Color is a data type representing a color in HTML.
error($e)
Get an error result.
A password is used as part of credentials for authentication.
dataSize($size, string $unit=null)
Represents the size of some data.
closedFloatInterval(float $minimum, float $maximum)
$colorfactory
cache for color factory.
positiveInteger(int $value)
openedIntegerInterval(int $minimum, int $maximum)
The scope of this class is split ilias-conform URI's into components.
password($pass)
Get a password.
clientId(string $clientId)
ok($value)
Get an ok result.
uri($uri_string)
Object representing an uri valid according to RFC 3986 with restrictions imposed on valid characters ...
openedFloatInterval(float $minimum, float $maximum)
closedIntegerInterval(int $minimum, int $maximum)