class Runtime (View source)

The Runtime class handles all variables generated during runtime.

Those variables are created by Automad at runtime and independent from the Context and Shared objects.

Properties

private $Automad The Automad object.
private $data The runtime data array.

Methods

__construct(Automad $Automad)

The constructor.

string
get(string $key)

Return the requested runtime variable.

set(string $key, mixed $value)

Set a runtime variable.

array
shelve()

Get the $data array to be shelved and restored at a later point.

unshelve(array $shelf)

Restore shelved $data array by replacing it with the passed $shelf array.

Details

__construct(Automad $Automad)

The constructor.

Parameters

Automad $Automad

string get(string $key)

Return the requested runtime variable.

Parameters

string $key

Return Value

string The value of $key or NULL if the requested variable doesn't exsist

set(string $key, mixed $value)

Set a runtime variable.

Parameters

string $key
mixed $value

array shelve()

Get the $data array to be shelved and restored at a later point.

Return Value

array The runtime data array

unshelve(array $shelf)

Restore shelved $data array by replacing it with the passed $shelf array.

Parameters

array $shelf