SetupResponse
in package
implements
ArrayAccess
This represents a response from the Setup UI.
Previously, responses where an array of the form: [0 => array $headers, 1 => string $body].
This implements \ArrayAccess for backward compatibility.
Table of Contents
Interfaces
- ArrayAccess
Properties
- $assets : array<string|int, mixed>
- $body : string
- $code : int
- $headers : array<string|int, mixed>
- $isComplete : bool
- $title : string|null
- $oldFieldMap : array<string|int, mixed>
Methods
- __construct() : mixed
- SetupResponse constructor.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
Properties
$assets
public
array<string|int, mixed>
$assets
= []
Ex: $assets[0] = ['type' => 'script-url', 'url' => 'http://foobar'];
$body
public
string
$body
= ''
Ex: '
Hello world
'$code
public
int
$code
= 200
$headers
public
array<string|int, mixed>
$headers
= []
Ex: ['Content-Type': 'text/html']
$isComplete
public
bool
$isComplete
= TRUE
TRUE if the body represents a fully formed HTML page. FALSE if the body is a fragment of an HTML page.
$title
public
string|null
$title
= NULL
The title of the response page (if it's an HTML response).
$oldFieldMap
protected
array<string|int, mixed>
$oldFieldMap
Array(int $oldPos => string $newName).
Methods
__construct()
SetupResponse constructor.
public
__construct() : mixed
offsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
& offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Attributes
- #[ReturnTypeWillChange]
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed