Inheritance: extends Icicle\Http\Message\Message
Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getCookie(string $name) : Cookie
 {
     return $this->message->getCookie($name);
 }
Exemplo n.º 2
0
 /**
  * @param Response $response
  *
  * @return \Generator
  *
  * @resolve string
  */
 protected function getResponseBody(Response $response) : \Generator
 {
     $data = '';
     $stream = $response->getBody();
     while ($stream->isReadable()) {
         $data .= (yield $stream->read());
     }
     return $data;
 }