Skip to content

StreamTemplateLayer

Template layer implementation for templates fetched using a PHP stream.

class StreamTemplateLayer extends TemplateLayer

ExtendsTemplateLayer
Since1.0.0
SourceView/StreamTemplateLayer.php

public function __construct(array<string, mixed> $parameters = []): mixed

Constructor.

Initial parameters.

ParameterTypeDescription
$parametersarray``<``string``, ``mixed``>Initial parameters.

Returns mixed

MethodDescription
getResourceStreamIdentifier(): ?stringGet the full, resolved stream location name to the template resource.

public function getResourceStreamIdentifier(): ?string

Get the full, resolved stream location name to the template resource.

Returns ?``string — A PHP stream resource identifier, or null if no template is set.

ThrowsWhen
QuioteExceptionIf the template could not be found.

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
appendParameter()ParameterHolderAppend a parameter.
appendParameterByRef()ParameterHolderAppend a parameter by reference.
clearParameters()ParameterHolderClear all parameters associated with this request.
execute()TemplateLayerA convenience function that renders all slots and then the main template.
getFlatParameterNames()ParameterHolderRetrieve an array of flattened parameter names.
getModule()TemplateLayerGet the name of the module this layer’s template belongs to.
getName()TemplateLayerGet the name of this layer.
getParameter()ParameterHolderRetrieve a parameter.
getParameterNames()ParameterHolderRetrieve an array of parameter names.
getParameters()ParameterHolderRetrieve an array of parameters.
getRenderer()TemplateLayerGet the renderer instance used for this layer.
getSlot()TemplateLayerGet the execution container for a slot.
getSlots()TemplateLayerGet all slots.
getTemplate()TemplateLayerGet the name of the template to render.
hasParameter()ParameterHolderIndicates whether or not a parameter exists.
hasSlot()TemplateLayerCheck whether or not a slot has been set.
hasSlots()TemplateLayerCheck if any slots have been set.
hasTemplate()TemplateLayerCheck whether a template has been set.
initialize()TemplateLayerInitialize the layer.
removeParameter()ParameterHolderRemove a parameter.
removeSlot()TemplateLayerRemove a slot.
removeTemplate()TemplateLayerRemove the configured template.
reset()TemplateLayerDrops the per-request rendering state so the layer can be reused.
setModule()TemplateLayerSet the name of the module this layer’s template belongs to.
setName()TemplateLayerSet the name of this layer.
setParameter()ParameterHolderSet a parameter.
setParameterByRef()ParameterHolderSet a parameter by reference.
setParameters()ParameterHolderSet an array of parameters.
setParametersByRef()ParameterHolderSet an array of parameters by reference.
setRenderer()TemplateLayerSet a renderer instance to use for this layer.
setSlot()TemplateLayerSet a slot that is rendered along with and available inside this layer.
setTemplate()TemplateLayerSet the name of the template to render.