Class

ezpKernelRedirect

class ezpKernelRedirect extends ezpKernelResult

Struct containing information on HTTP redirection.

Methods

__construct($url, $redirectStatus = null, string $content = null)

setContent(string $content)

Sets the main content.

from ezpKernelResult
string getContent()

Returns the result's main content.

from ezpKernelResult
setAttribute(string $name, mixed $value)

Sets an attribute

from ezpKernelResult
mixed getAttribute(string $name, mixed $defaultValue = null)

from ezpKernelResult
bool hasAttribute(string $name)

Checks if $name attribute is present

from ezpKernelResult
array getAttributes()

Returns all the attributes

from ezpKernelResult
setAttributes(array $attributes)

Sets multiple attributes at once.

from ezpKernelResult
replaceAttributes(array $attributes)

Replaces internal attributes entirely.

from ezpKernelResult
int getStatusCode()

string getTargetUrl()

Details

at line 29
public __construct($url, $redirectStatus = null, string $content = null)

Parameters

$url
$redirectStatus
string $content The result's main content

in ezpKernelResult at line 44
public setContent(string $content)

Sets the main content.

Parameters

string $content

in ezpKernelResult at line 54
public string getContent()

Returns the result's main content.

Return Value

string

in ezpKernelResult at line 65
public setAttribute(string $name, mixed $value)

Sets an attribute

Parameters

string $name
mixed $value

in ezpKernelResult at line 75
public mixed getAttribute(string $name, mixed $defaultValue = null)

Parameters

string $name
mixed $defaultValue Default value to return if the attribute doesn't exist.

Return Value

mixed

in ezpKernelResult at line 86
public bool hasAttribute(string $name)

Checks if $name attribute is present

Parameters

string $name

Return Value

bool

in ezpKernelResult at line 96
public array getAttributes()

Returns all the attributes

Return Value

array

in ezpKernelResult at line 106
public setAttributes(array $attributes)

Sets multiple attributes at once.

Internal ones that are not inside $attributes won't be overridden.

Parameters

array $attributes

in ezpKernelResult at line 116
public replaceAttributes(array $attributes)

Replaces internal attributes entirely.

Parameters

array $attributes

at line 39
public int getStatusCode()

Return Value

int

at line 47
public string getTargetUrl()

Return Value

string