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.

Methods

__construct(object $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(object $Automad)

The constructor.

Parameters

object $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