Zend\Stratigility\Http\ResponseInterface::write PHP Method

write() public method

Proxies to the underlying stream and writes the provided data to it.
public write ( string $data )
$data string
    public function write($data);

Usage Example

 /**
  * Ping action.
  *
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @return string
  */
 public function ping(ServerRequestInterface $request, ResponseInterface $response)
 {
     $data = ['ack' => time(), 'target' => __METHOD__];
     $response->write($this->json->render($data));
     return $this->json->response($response);
 }
All Usage Examples Of Zend\Stratigility\Http\ResponseInterface::write
ResponseInterface