public function Response::__toString in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::__toString()
- 8 vendor/symfony/browser-kit/Response.php \Symfony\Component\BrowserKit\Response::__toString()
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::__toString()
Returns the Response as an HTTP string.
The string representation of the Response is the same as the one that will be sent to the client only if the prepare() method has been called before.
Return value
string The Response as an HTTP string
See also
prepare()
File
- vendor/
symfony/ http-foundation/ Response.php, line 236
Class
- Response
- Response represents an HTTP response.
Namespace
Symfony\Component\HttpFoundationCode
public function __toString() {
return sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText) . "\r\n" . $this->headers . "\r\n" . $this
->getContent();
}