ResponseMaker
Response Maker Trait
Stores attributes the can be used to prepare a response from the server.
trait System\Traits\ResponseMaker
Properties
protected
$responseHeaderBag
:
Symfony\Component\HttpFoundation\ResponseHeaderBag
= null
protected
$responseOverride
:
mixed
= null
Override the standard controller response.
protected
$statusCode
:
int
= 200
Response status code
Methods
public getResponseHeaders () : Symfony\Component\HttpFoundation\ResponseHeaderBag | null
Get the header response bag
public getStatusCode () : int
Returns the status code for the current web response.
Status code
public makeResponse (mixed $contents) : mixed
Prepares a response that considers overrides and custom responses.
Property | Type | Description |
---|---|---|
$contents | mixed |
mixed
|
public setResponse (mixed $response) : $this
Sets the response for the current page request cycle, this value takes priority over the standard response prepared by the controller.
Property | Type | Description |
---|---|---|
$response | mixed |
mixed
Response object or string |
public setResponseCookie (Symfony\Component\HttpFoundation\Cookie | mixed $cookie) : $this
Add a cookie to the response.
Property | Type | Description |
---|---|---|
$cookie | Symfony\Component\HttpFoundation\Cookie | mixed |
Symfony\Component\HttpFoundation\Cookie | mixed
|
public
setResponseHeader (string $key, array | string $values, boolean $replace = true
)
: $this
Set a header on the Response.
Property | Type | Description |
---|---|---|
$key | string |
string
|
$values | array | string |
array | string
|
$replace | boolean |
boolean
|
public setStatusCode (int $code) : $this
Sets the status code for the current web response.
Property | Type | Description |
---|---|---|
$code | int |
int
Status code |
Used by
Class | Description |
---|---|
EventLogs
|
Event Logs controller |
MailBrandSettings
|
Mail brand customization controller |
MailLayouts
|
Mail layouts controller |
MailPartials
|
Mail partials controller |
MailTemplates
|
Mail templates controller |
RequestLogs
|
Request Logs controller |
Settings
|
Settings controller |
Updates
|
Updates controller |
Controller
|
The Backend base controller class, used by Backend controllers. |
AccessLogs
|
Access Logs controller |
Auth
|
Authentication controller |
Files
|
Backend files controller |
Index
|
Dashboard controller |
Media
|
Backend Media Manager |
Preferences
|
Editor Settings controller |
UserGroups
|
Backend user groups controller |
UserRoles
|
Backend user groups controller |
Users
|
Backend user controller |
Controller
|
The CMS controller class. |
Index
|
CMS index |
Media
|
CMS Media Manager |
ThemeLogs
|
Request Logs controller |
ThemeOptions
|
Theme customization controller |
Themes
|
Theme selector controller |