TemplateEngineInterface
A pluggable view-rendering backend (e.g. Latte, Twig, plain PHP).
TemplateEngineInterface::setViewPath()
abstract public function setViewPath(string $path): voidSets the base directory the engine resolves template paths against.
Parameters
| Name | Type | Description |
|---|---|---|
| $path | string |
TemplateEngineInterface::render()
abstract public function render(string $template, array $params = []): stringRenders the given template with the supplied variables and returns the resulting output.
Parameters
| Name | Type | Description |
|---|---|---|
| $template | string | |
| $params | array<string, mixed> |