PHP Class Phly\Http\Response\Serializer

Inheritance: extends Phly\Http\AbstractSerializer
Datei anzeigen Open project: phly/http Class Usage Examples

Public Methods

Method Description
fromStream ( Psr\Http\Message\StreamInterface $stream ) : Psr\Http\Message\ResponseInterface Parse a response from a stream.
fromString ( string $message ) : Response Deserialize a response string to a response instance.
toString ( Psr\Http\Message\ResponseInterface $response ) : string Create a string representation of a response.

Private Methods

Method Description
getStatusLine ( Psr\Http\Message\StreamInterface $stream ) : array Retrieve the status line for the message.

Method Details

fromStream() public static method

Parse a response from a stream.
public static fromStream ( Psr\Http\Message\StreamInterface $stream ) : Psr\Http\Message\ResponseInterface
$stream Psr\Http\Message\StreamInterface
return Psr\Http\Message\ResponseInterface

fromString() public static method

Deserialize a response string to a response instance.
public static fromString ( string $message ) : Response
$message string
return Phly\Http\Response

toString() public static method

Create a string representation of a response.
public static toString ( Psr\Http\Message\ResponseInterface $response ) : string
$response Psr\Http\Message\ResponseInterface
return string