Response (Component\BrowserKit)
Symfony\Component\BrowserKit\Response
class Response
Response object.
Methods
__construct(string $content = '', int $status = 200, array $headers = array()) Constructor. | ||
string | __toString() Converts the response object to string containing all headers and the response content. | |
string | getContent() Gets the response content. | |
int | getStatus() Gets the response status code. | |
array | getHeaders() Gets the response headers. | |
string|array | getHeader(string $header, bool $first = true) Gets a response header. |
Details
public __construct(string $content = '', int $status = 200, array $headers = array())
Constructor.
The headers array is a set of key/value pairs. If a header is present multiple times then the value is an array of all the values.
public string __toString()
Converts the response object to string containing all headers and the response content.
public string getContent()
Gets the response content.
public int getStatus()
Gets the response status code.
public array getHeaders()
Gets the response headers.
public string|array getHeader(string $header, bool $first = true)
Gets a response header.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/BrowserKit/Response.html