class Rendering

Traits

Provides magic get, set, isset and unset implementations

Properties

protected Configurator $configurator
RendererGenerator $engine
TemplateParameterCollection $parameters

Parameters used by the renderer

Methods

mixed
__get(string $propName)

Magic getter

void
__set(string $propName, mixed $propValue)

Magic setter

bool
__isset(string $propName)

Test whether a property is set

void
__unset(string $propName)

Unset a property, if the class supports it

__construct(Configurator $configurator)

Constructor

array
getAllParameters()

Get all the parameters defined and/or used in all the templates

getEngine()

Return the renderer generator used by this instance

Renderer
getRenderer()

Return an instance of Renderer based on the current config

array
getTemplates()

Get the templates defined in all the targs

setEngine(string|RendererGenerator $engine)

Set the RendererGenerator instance used

Details

in Configurable at line 30
mixed __get(string $propName)

Magic getter

Will return $this->foo if it exists, then $this->getFoo() or will throw an exception if neither exists

Parameters

string $propName

Return Value

mixed

in Configurable at line 61
void __set(string $propName, mixed $propValue)

Magic setter

Will call $this->setFoo($propValue) if it exists, otherwise it will set $this->foo. If $this->foo is a NormalizedCollection, we do not replace it, instead we clear() it then fill it back up. It will not overwrite an object with a different incompatible object (of a different, non-extending class) and it will throw an exception if the PHP type cannot match without incurring data loss.

Parameters

string $propName
mixed $propValue

Return Value

void

in Configurable at line 147
bool __isset(string $propName)

Test whether a property is set

Parameters

string $propName

Return Value

bool

in Configurable at line 164
void __unset(string $propName)

Unset a property, if the class supports it

Parameters

string $propName

Return Value

void

at line 44
__construct(Configurator $configurator)

Constructor

Parameters

Configurator $configurator

at line 55
array getAllParameters()

Get all the parameters defined and/or used in all the templates

Return Value

array

Associative array of parameters names and their default value

at line 85
RendererGenerator getEngine()

Return the renderer generator used by this instance

Return Value

RendererGenerator

at line 100
Renderer getRenderer()

Return an instance of Renderer based on the current config

Return Value

Renderer

at line 110
array getTemplates()

Get the templates defined in all the targs

Return Value

array

Associative array of template names and content

at line 141
RendererGenerator setEngine(string|RendererGenerator $engine)

Set the RendererGenerator instance used

NOTE: extra parameters are passed to the RendererGenerator's constructor

Parameters

string|RendererGenerator $engine

Engine name or instance of RendererGenerator

Return Value

RendererGenerator

Instance of RendererGenerator