Exemple #1
0
 /**
  * @param array|ValueRangeInterface $range
  */
 public function __construct($range)
 {
     parent::__construct(null);
     if (!is_array($range) && !$range instanceof ValueRangeInterface) {
         throw new InvalidArgumentException('range', 'array or instance of ValueRangeInterface', $range);
     }
     $this->range = $range;
 }
Exemple #2
0
 public function __construct($allowSpaces = false, array $options = [])
 {
     parent::__construct($options);
     $this->allowSpaces = $allowSpaces;
 }
Exemple #3
0
 public function __construct($minLength = 0, $maxLength = 0, $options = [])
 {
     $this->minLength = $minLength;
     $this->maxLength = $maxLength;
     parent::__construct($options);
 }
Exemple #4
0
 public function __construct($sameAs, $options = null)
 {
     $this->sameElement = $sameAs;
     parent::__construct($options);
 }
Exemple #5
0
 public function __construct(callable $closure, $options = null)
 {
     $this->closure = $closure;
     parent::__construct($options);
 }