示例#1
0
 function outputOfHttpHeaderIs(header $header, output $output)
 {
     $formater = clone $this;
     $formater->output = $output;
     $formater->noValueFormater = $this->defaultValueFormater;
     $header->recipientOfHttpHeaderValueIs($formater);
     $formater->noValueFormater->outputIs($output);
     return $this;
 }
示例#2
0
 function httpHeaderIs(header $header)
 {
     $collection = clone $this;
     $collection->headerName = null;
     $header->recipientOfHttpHeaderNameIs($collection);
     if ($collection->headerName) {
         $collection->headers[(string) $collection->headerName] = $header;
     }
     return $collection;
 }
示例#3
0
 function __construct(ostring\length $length = null)
 {
     parent::__construct(new http\header\name('Content-Length'), new http\header\value((string) $length ?: '0'));
 }