Exemplo n.º 1
0
 function httpRequestUriOffsetIs(uri\offset $offset)
 {
     $uri = parent::valueIs('/' . (new risingsun\ostring(self::normalize($this)))->ostringOffsetIs(new risingsun\ostring\offset($offset->value)));
     $uri->ifEqualToString($this, function () use(&$uri) {
         $uri = new self('/1');
     });
     return $uri;
 }
Exemplo n.º 2
0
 function __construct($value)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
     }
     if ($domainException || self::isEmpty($value)) {
         throw new \domainException('Value should be a not empty string');
     }
 }
Exemplo n.º 3
0
 function __construct($value)
 {
     $domainException = null;
     try {
         parent::__construct($value);
     } catch (\domainException $domainException) {
     }
     if ($domainException || !self::isSegment($value)) {
         throw new \domainException('Value should be a valid HTTP request URI segment');
     }
 }
Exemplo n.º 4
0
 function __construct($value, data\name ...$names)
 {
     parent::__construct($value);
     $this->names = $names;
 }
Exemplo n.º 5
0
 function ifIsStartOfString(self $string, callable $isStart, callable $isNotStart = null)
 {
     $string->ifStartWithString($this, $isStart, $isNotStart);
     return $this;
 }