Trait implementing functionality common to requests and responses.
Trait
| Methods |
| public getBody() : Psr\Http\Message\StreamInterface |
| public getHeader( $header) : array |
| public getHeaderLine( $header) : string |
| public getHeaders() : array |
| public getProtocolVersion() : string |
| public hasHeader( $header) : bool |
| public withAddedHeader( $header, $value) : Psr\Http\Message\MessageInterface |
| public withBody(Psr\Http\Message\StreamInterface $body) : Psr\Http\Message\MessageInterface |
| public withHeader( $header, $value) : Psr\Http\Message\MessageInterface |
| public withoutHeader( $header) : Psr\Http\Message\MessageInterface |
| public withProtocolVersion( $version) : Psr\Http\Message\MessageInterface |
| Properties |
private $headerNames = []
|
private $headers = []
|
private $protocol = '1.1'
|
private $stream = NULL
|
| Methods |
private assertHeader( $header) : void
|
private assertValue(string $value) : void
|
private normalizeHeaderValue( $value) : array
|
private setHeaders(array $headers) : void
|
| private trimAndValidateHeaderValues(array $values) : array Trims whitespace from the header values. Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. header-field = field-name ":" OWS field-value OWS OWS = *( SP / HTAB )
|