Response
classe Response implémente ResponseInterface (Voir la source)
Méthodes
static Response
getInstance()
Get response
string
getContent()
Get response message
int
getCode()
Get status code
array
getHeaders()
Get headers
setContent(string $content)
Get response message
withHeaders(array $headers)
Get headers
string
download(string $file, null $filename = null, string $disposition = 'attachment', array $headers = [])
Download the given file as an argument
mixed
status(int $code)
Modify http headers
string
json(mixed $data, int $code = 200, array $headers = [])
JSON response
string
string
render($template, array $data = [], int $code = 200, array $headers = [])
Make view rendering
AccessControl
serverAccessControl()
Get accessControl instance
string
sendContent()
Pas de description
Détails
static Response
getInstance()
Get response
string
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)
Modify http headers
string
download(string $file, null $filename = null, string $disposition = 'attachment', array $headers = [])
Download the given file as an argument
mixed
status(int $code)
Modify http headers
string
json(mixed $data, int $code = 200, array $headers = [])
JSON response
string
send(string|array|stdClass $data, int $code = 200, array $headers = [])
Equivalent to an echo, except that it ends the application
string
render($template, array $data = [], int $code = 200, array $headers = [])
Make view rendering
AccessControl
serverAccessControl()
Get accessControl instance
string
sendContent()
Pas de description