public function __construct(SetInterface $values) { $values->foreach(function (HeaderValueInterface $value) { if (!$value instanceof AcceptLanguageValue) { throw new InvalidArgumentException(); } }); parent::__construct('Accept-Language', $values); }
public function __construct(SetInterface $values) { if ($values->size() === 0) { throw new CacheControlHeaderMustContainAtLeastOneValueException(); } $values->foreach(function (HeaderValueInterface $header) { if (!$header instanceof CacheControlValueInterface) { throw new InvalidArgumentException(); } }); parent::__construct('Cache-Control', $values); }
public function __construct(SetInterface $values) { if ($values->size() === 0) { throw new AcceptHeaderMustContainAtLeastOneValueException(); } $values->foreach(function (HeaderValueInterface $value) { if (!$value instanceof AcceptValue) { throw new InvalidArgumentException(); } }); parent::__construct('Accept', $values); }
public function __construct(ContentEncodingValue $encoding) { parent::__construct('Content-Encoding', (new Set(HeaderValueInterface::class))->add($encoding)); }
public function __construct(LocationValue $location) { parent::__construct('Content-Location', (new Set(HeaderValueInterface::class))->add($location)); }
public function __construct(RangeValue $range) { parent::__construct('Range', (new Set(HeaderValueInterface::class))->add($range)); }
public function __construct(HostValue $host) { parent::__construct('Host', (new Set(HeaderValueInterface::class))->add($host)); }
public function __construct(AuthorizationValue $authorization) { parent::__construct('Authorization', (new Set(HeaderValueInterface::class))->add($authorization)); }
public function __construct(DateValue $date) { parent::__construct('Expires', (new Set(HeaderValueInterface::class))->add($date)); }
public function __construct(ContentTypeValue $content) { parent::__construct('Content-Type', (new Set(HeaderValueInterface::class))->add($content)); }
public function __construct(AcceptRangesValue $ranges) { parent::__construct('Accept-Ranges', (new Set(HeaderValueInterface::class))->add($ranges)); }
public function __construct(DateValue $date) { parent::__construct('If-Unmodified-Since', (new Set(HeaderValueInterface::class))->add($date)); }
public function __construct(ContentLengthValue $length) { parent::__construct('Content-Length', (new Set(HeaderValueInterface::class))->add($length)); }
public function __construct(ReferrerValue $referrer) { parent::__construct('Referer', (new Set(HeaderValueInterface::class))->add($referrer)); }
public function __construct(DateValue $date) { parent::__construct('Last-Modified', (new Set(HeaderValueInterface::class))->add($date)); }