Response
class Response implements ResponseInterface (View source)
Methods
Get response
Get response message
Get status code
Get headers
Get response message
Get headers
Add http headers
Download the given file as an argument
JSON response
Equivalent to an echo, except that it ends the application
Make view rendering
Modify the service access control from ServerAccessControl instance
No description
Details
static Response
getInstance()
Get response
string|null
getContent()
Get response message
int
getCode()
Get status code
array
getHeaders()
Get headers
Response
setContent(string $content)
Get response message
Response
withHeaders(array $headers)
Get headers
Response
addHeader(string $key, string $value)
Add http header
Response
addHeaders(array $headers)
Add http headers
string
download(string $file, string|null $filename = null, array $headers = [])
Download the given file as an argument
Response
status(int $code)
Modify http headers
string
json(mixed $data, int $code = 200, array $headers = [])
JSON response
string
send(mixed $data, int $code = 200, array $headers = [])
Equivalent to an echo, except that it ends the application
string
render(string $template, array $data = [], int $code = 200, array $headers = [])
Make view rendering
ServerAccessControl
getServerAccessControl()
Modify the service access control from ServerAccessControl instance
void
sendContent()
No description