Exemple #1
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');
     }
 }
Exemple #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');
     }
 }
Exemple #3
0
 function __construct($value, data\name ...$names)
 {
     parent::__construct($value);
     $this->names = $names;
 }
Exemple #4
0
 function __construct($value = '/')
 {
     self::valueForCallableIs(function ($value) {
         parent::__construct($value);
     }, $value);
 }