PHP Class Zend\Diactoros\Request\Serializer
This class provides functionality for serializing a RequestInterface instance
to a string, as well as the reverse operation of creating a Request instance
from a string/stream representing a message.
Datei anzeigen
Open project: zendframework/zend-diactoros
Class Usage Examples
Public Methods
Method |
Description |
|
fromStream ( Psr\Http\Message\StreamInterface $stream ) : Request |
Deserialize a request stream to a request instance. |
|
fromString ( string $message ) : Request |
Deserialize a request string to a request instance. |
|
toString ( Psr\Http\Message\RequestInterface $request ) : string |
Serialize a request message to a string. |
|
Private Methods
Method |
Description |
|
createUriFromRequestTarget ( string $requestTarget ) : Uri |
Create and return a Uri instance based on the provided request target. |
|
getRequestLine ( Psr\Http\Message\StreamInterface $stream ) : array |
Retrieve the components of the request line. |
|
Method Details
fromStream()
public static method
Deserialize a request stream to a request instance.
public static fromStream ( Psr\Http\Message\StreamInterface $stream ) : Request |
$stream |
Psr\Http\Message\StreamInterface |
|
return |
Zend\Diactoros\Request |
|
fromString()
public static method
Internally, casts the message to a stream and invokes fromStream().
toString()
public static method
Serialize a request message to a string.
public static toString ( Psr\Http\Message\RequestInterface $request ) : string |
$request |
Psr\Http\Message\RequestInterface |
|
return |
string |
|