Class

ezpKernelResult

class ezpKernelResult

Struct containing the kernel result.

Methods

__construct(string $content = null, array $defaultAttributes = array())

setContent(string $content)

Sets the main content.

string getContent()

Returns the result's main content.

setAttribute(string $name, mixed $value)

Sets an attribute

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

bool hasAttribute(string $name)

Checks if $name attribute is present

array getAttributes()

Returns all the attributes

setAttributes(array $attributes)

Sets multiple attributes at once.

replaceAttributes(array $attributes)

Replaces internal attributes entirely.

Details

at line 33
public __construct(string $content = null, array $defaultAttributes = array())

Parameters

string $content The result's main content
array $defaultAttributes

at line 44
public setContent(string $content)

Sets the main content.

Parameters

string $content

at line 54
public string getContent()

Returns the result's main content.

Return Value

string

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

Sets an attribute

Parameters

string $name
mixed $value

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

at line 86
public bool hasAttribute(string $name)

Checks if $name attribute is present

Parameters

string $name

Return Value

bool

at line 96
public array getAttributes()

Returns all the attributes

Return Value

array

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

at line 116
public replaceAttributes(array $attributes)

Replaces internal attributes entirely.

Parameters

array $attributes