CR
CR = "\r"
Provides base functionality for request and response de/serialization strategies, including functionality for retrieving a line at a time from the message, splitting headers from the body, and serializing headers.
fromString(string $message) : \Zend\Diactoros\Response
Deserialize a response string to a response instance.
string | $message |
when errors occur parsing the message.
fromStream(\Psr\Http\Message\StreamInterface $stream) : \Zend\Diactoros\Response
Parse a response from a stream.
\Psr\Http\Message\StreamInterface | $stream |
when the stream is not readable.
when errors occur parsing the message.
toString(\Psr\Http\Message\ResponseInterface $response) : string
Create a string representation of a response.
\Psr\Http\Message\ResponseInterface | $response |
getLine(\Psr\Http\Message\StreamInterface $stream) : string
Retrieve a single line from the stream.
Retrieves a line from the stream; a line is defined as a sequence of characters ending in a CRLF sequence.
\Psr\Http\Message\StreamInterface | $stream |
if the sequence contains a CR or LF in isolation, or ends in a CR.
splitStream(\Psr\Http\Message\StreamInterface $stream) : array
Split the stream into headers and body content.
Returns an array containing two elements
\Psr\Http\Message\StreamInterface | $stream |
For invalid headers.
getStatusLine(\Psr\Http\Message\StreamInterface $stream) : array
Retrieve the status line for the message.
\Psr\Http\Message\StreamInterface | $stream |
if line is malformed
Array with three elements: 0 => version, 1 => status, 2 => reason
Loading…