PSR-7 response implementation.
CloneableInstantiable
- Implements
Psr\Http\Message\MessageInterface Psr\Http\Message\ResponseInterface - Traits
| Methods |
public __construct(int $status = 200, array $headers = [], $body = NULL, string $version = '1.1', ?string $reason = NULL)
|
| public getBody() : Psr\Http\Message\StreamInterface |
| public getHeader( $header) : array |
| public getHeaderLine( $header) : string |
| public getHeaders() : array |
| public getProtocolVersion() : string |
| public getReasonPhrase() : string |
| public getStatusCode() : int |
| 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
|
| public withStatus( $code, $reasonPhrase = '') : Psr\Http\Message\ResponseInterface |
| Constants |
| private GuzzleHttp Map of standard HTTP status code/reason phrases |
| Properties |
private $headerNames = []
|
private $headers = []
|
private $protocol = '1.1'
|
private $reasonPhrase = NULL
|
private $statusCode = NULL
|
private $stream = NULL
|
| Methods |
private assertHeader( $header) : void
|
private assertStatusCodeIsInteger( $statusCode) : void
|
| private assertStatusCodeRange(int $statusCode) : 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 )
|