You are here

public static function Serializer::fromString in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/Request/Serializer.php \Zend\Diactoros\Request\Serializer::fromString()
  2. 8 vendor/zendframework/zend-diactoros/src/Response/Serializer.php \Zend\Diactoros\Response\Serializer::fromString()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-diactoros/src/Response/Serializer.php \Zend\Diactoros\Response\Serializer::fromString()

Deserialize a response string to a response instance.

Parameters

string $message:

Return value

Response

Throws

UnexpectedValueException when errors occur parsing the message.

File

vendor/zendframework/zend-diactoros/src/Response/Serializer.php, line 29

Class

Serializer

Namespace

Zend\Diactoros\Response

Code

public static function fromString($message) {
  $stream = new Stream('php://temp', 'wb+');
  $stream
    ->write($message);
  return static::fromStream($stream);
}