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

protected $responseOverride : mixed

Override the standard controller response.

protected $statusCode : int

Response status code

Methods

public getResponseHeaders () : Symfony\Component\HttpFoundation\ResponseHeaderBag | null

Get the header response bag

Returns
Symfony\Component\HttpFoundation\ResponseHeaderBag | null

public getStatusCode () : int

Returns the status code for the current web response.

Returns
int

Status code

public makeResponse (mixed $contents) : mixed

Prepares a response that considers overrides and custom responses.

Parameters
Property Description
$contents
mixed
Returns
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.

Parameters
Property Description
$response
mixed

Response object or string

Returns
$this

public setResponseCookie (Symfony\Component\HttpFoundation\Cookie | mixed $cookie) : $this

Add a cookie to the response.

Parameters
Property Description
$cookie
Symfony\Component\HttpFoundation\Cookie | mixed
Returns
$this

public setResponseHeader (string $key, array | string $values, boolean $replace = true) : $this

Set a header on the Response.

Parameters
Property Description
$key
string
$values
array | string
$replace
boolean
Returns
$this

public setStatusCode (int $code) : $this

Sets the status code for the current web response.

Parameters
Property Description
$code
int

Status code

Returns
$this

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

Copyright © 2024 Winter CMS