StreamTemplateLayer
Template layer implementation for templates fetched using a PHP stream.
Synopsis
Section titled “Synopsis”class StreamTemplateLayer extends TemplateLayer
| Extends | TemplateLayer |
| Since | 1.0.0 |
| Source | View/StreamTemplateLayer.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(array<string, mixed> $parameters = []): mixed
Constructor.
Initial parameters.
| Parameter | Type | Description |
|---|---|---|
$parameters | array``<``string``, ``mixed``> | Initial parameters. |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
getResourceStreamIdentifier(): ?string | Get the full, resolved stream location name to the template resource. |
getResourceStreamIdentifier()
Section titled “getResourceStreamIdentifier()”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.
| Throws | When |
|---|---|
QuioteException | If the template could not be found. |
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
appendParameter() | ParameterHolder | Append a parameter. |
appendParameterByRef() | ParameterHolder | Append a parameter by reference. |
clearParameters() | ParameterHolder | Clear all parameters associated with this request. |
execute() | TemplateLayer | A convenience function that renders all slots and then the main template. |
getFlatParameterNames() | ParameterHolder | Retrieve an array of flattened parameter names. |
getModule() | TemplateLayer | Get the name of the module this layer’s template belongs to. |
getName() | TemplateLayer | Get the name of this layer. |
getParameter() | ParameterHolder | Retrieve a parameter. |
getParameterNames() | ParameterHolder | Retrieve an array of parameter names. |
getParameters() | ParameterHolder | Retrieve an array of parameters. |
getRenderer() | TemplateLayer | Get the renderer instance used for this layer. |
getSlot() | TemplateLayer | Get the execution container for a slot. |
getSlots() | TemplateLayer | Get all slots. |
getTemplate() | TemplateLayer | Get the name of the template to render. |
hasParameter() | ParameterHolder | Indicates whether or not a parameter exists. |
hasSlot() | TemplateLayer | Check whether or not a slot has been set. |
hasSlots() | TemplateLayer | Check if any slots have been set. |
hasTemplate() | TemplateLayer | Check whether a template has been set. |
initialize() | TemplateLayer | Initialize the layer. |
removeParameter() | ParameterHolder | Remove a parameter. |
removeSlot() | TemplateLayer | Remove a slot. |
removeTemplate() | TemplateLayer | Remove the configured template. |
reset() | TemplateLayer | Drops the per-request rendering state so the layer can be reused. |
setModule() | TemplateLayer | Set the name of the module this layer’s template belongs to. |
setName() | TemplateLayer | Set the name of this layer. |
setParameter() | ParameterHolder | Set a parameter. |
setParameterByRef() | ParameterHolder | Set a parameter by reference. |
setParameters() | ParameterHolder | Set an array of parameters. |
setParametersByRef() | ParameterHolder | Set an array of parameters by reference. |
setRenderer() | TemplateLayer | Set a renderer instance to use for this layer. |
setSlot() | TemplateLayer | Set a slot that is rendered along with and available inside this layer. |
setTemplate() | TemplateLayer | Set the name of the template to render. |