Exemple #1
0
 public function __construct(SetInterface $values)
 {
     $values->foreach(function (HeaderValueInterface $value) {
         if (!$value instanceof AcceptLanguageValue) {
             throw new InvalidArgumentException();
         }
     });
     parent::__construct('Accept-Language', $values);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 public function __construct(ContentEncodingValue $encoding)
 {
     parent::__construct('Content-Encoding', (new Set(HeaderValueInterface::class))->add($encoding));
 }
Exemple #5
0
 public function __construct(LocationValue $location)
 {
     parent::__construct('Content-Location', (new Set(HeaderValueInterface::class))->add($location));
 }
Exemple #6
0
 public function __construct(RangeValue $range)
 {
     parent::__construct('Range', (new Set(HeaderValueInterface::class))->add($range));
 }
Exemple #7
0
 public function __construct(HostValue $host)
 {
     parent::__construct('Host', (new Set(HeaderValueInterface::class))->add($host));
 }
Exemple #8
0
 public function __construct(AuthorizationValue $authorization)
 {
     parent::__construct('Authorization', (new Set(HeaderValueInterface::class))->add($authorization));
 }
Exemple #9
0
 public function __construct(DateValue $date)
 {
     parent::__construct('Expires', (new Set(HeaderValueInterface::class))->add($date));
 }
Exemple #10
0
 public function __construct(ContentTypeValue $content)
 {
     parent::__construct('Content-Type', (new Set(HeaderValueInterface::class))->add($content));
 }
Exemple #11
0
 public function __construct(AcceptRangesValue $ranges)
 {
     parent::__construct('Accept-Ranges', (new Set(HeaderValueInterface::class))->add($ranges));
 }
Exemple #12
0
 public function __construct(DateValue $date)
 {
     parent::__construct('If-Unmodified-Since', (new Set(HeaderValueInterface::class))->add($date));
 }
Exemple #13
0
 public function __construct(ContentLengthValue $length)
 {
     parent::__construct('Content-Length', (new Set(HeaderValueInterface::class))->add($length));
 }
Exemple #14
0
 public function __construct(ReferrerValue $referrer)
 {
     parent::__construct('Referer', (new Set(HeaderValueInterface::class))->add($referrer));
 }
Exemple #15
0
 public function __construct(DateValue $date)
 {
     parent::__construct('Last-Modified', (new Set(HeaderValueInterface::class))->add($date));
 }