end() public method

A completed response should no longer allow manipulation of either headers or the content body. If $data is passed, that data should be written to the response body prior to marking the response as complete.
public end ( string $data = null ) : self
$data string
return self
 /**
  * Write the given message to the response and mark it complete.
  *
  * If the message is an Http\Response decorator, call and return its
  * `end()` method; otherwise, decorate the response and `end()` it.
  *
  * @param ResponseInterface $response
  * @param string $message
  * @return Http\Response
  */
 private function completeResponse(ResponseInterface $response, $message)
 {
     if ($response instanceof Http\Response) {
         return $response->end($message);
     }
     $response = new Http\Response($response);
     return $response->end($message);
 }