Пример #1
0
 public function __construct($value)
 {
     if (!is_array($value)) {
         throw new InvalidTypeException($value, ['array']);
     }
     parent::__construct($value);
 }
Пример #2
0
 /**
  * @param $value
  */
 public function __construct($value)
 {
     if (!filter_var($value, FILTER_VALIDATE_URL)) {
         throw new InvalidTypeException($value, ['url']);
     }
     parent::__construct($value);
 }
Пример #3
0
 /**
  * @param  MultipleValue $object
  * @return bool
  */
 public function equals(ValueObject $object)
 {
     return serialize($this->getValue()) === serialize($object->getValue());
 }
Пример #4
0
 public function __construct($value, $mustExist = true, $timeout = 10)
 {
     parent::__construct($value);
     $this->timeout = $timeout;
     $this->mustExist = $mustExist;
 }
Пример #5
0
 public function __construct($value)
 {
     parent::__construct($value);
     $this->init()->setOption($this->headers)->setOption($this->timeout)->setOption($this->connectTimeout);
 }
Пример #6
0
 /**
  * @return string
  */
 public function __toString()
 {
     parent::__toString();
 }