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