PHP Класс 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.
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
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. |
|
Приватные методы
Метод |
Описание |
|
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. |
|
Описание методов
fromStream()
публичный статический Метод
Deserialize a request stream to a request instance.
public static fromStream ( Psr\Http\Message\StreamInterface $stream ) : Request |
$stream |
Psr\Http\Message\StreamInterface |
|
Результат |
Zend\Diactoros\Request |
|
fromString()
публичный статический Метод
Internally, casts the message to a stream and invokes fromStream().
toString()
публичный статический Метод
Serialize a request message to a string.
public static toString ( Psr\Http\Message\RequestInterface $request ) : string |
$request |
Psr\Http\Message\RequestInterface |
|
Результат |
string |
|