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