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