Methods |
public
static
|
fromPsr7<T is MessageInterface>(T $message): T&HttpMessageInterface
Get an instance of the class from a compatible PSR-7 message
Get an instance of the class from a compatible PSR-7 message
Throws
InvalidArgumentException |
if the class cannot be instantiated from
$message , e.g. if the class implements {@see RequestInterface} and
$message is a {@see ResponseInterface}.
|
Implemented by
|
#
|
public
|
getHttpHeaders(): HttpHeadersInterface
Get the HTTP headers of the message
Get the HTTP headers of the message
|
#
|
public
|
getHeaderValues(string $name): string[]
Get the value of a message header as a list of values, splitting any
comma-separated values
Get the value of a message header as a list of values, splitting any
comma-separated values
|
#
|
public
|
getFirstHeaderLine(string $name): string
Get the first value of a message header after splitting any
comma-separated values
Get the first value of a message header after splitting any
comma-separated values
|
#
|
public
|
getLastHeaderLine(string $name): string
Get the last value of a message header after splitting any
comma-separated values
Get the last value of a message header after splitting any
comma-separated values
|
#
|
public
|
getOneHeaderLine(string $name, bool $orSame = false): string
Get the only value of a message header after splitting any
comma-separated values
Get the only value of a message header after splitting any
comma-separated values
An exception is thrown if the header has more than one value.
|
#
|
public
|
getHttpPayload(bool $withoutBody = false): string
Get the message as an HTTP payload
Get the message as an HTTP payload
Implemented by
|
#
|
public
|
jsonSerialize(
): array{httpVersion: string, cookies: array<array{name: string, value: string, path?: string, domain?: string, expires?: string, httpOnly?: bool, secure?: bool}>, headers: array<array{name: string, value: string}>, headersSize: int, bodySize: int}
Get the message as an HTTP Archive (HAR) object
Get the message as an HTTP Archive (HAR) object
|
#
|