Method |
Description |
|
__construct ( string $templatePath = "", array $attributes = [] ) |
SlimRenderer constructor. |
|
addAttribute ( $key, $value ) |
Add an attribute |
|
fetch ( $template, array $data = [] ) : mixed |
Renders a template and returns the result as a string |
|
getAttribute ( $key ) : mixed |
Retrieve an attribute |
|
getAttributes ( ) : array |
Get the attributes for the renderer |
|
getTemplatePath ( ) : string |
Get the template path |
|
render ( Psr\Http\Message\ResponseInterface $response, string $template, array $data = [] ) : Psr\Http\Message\ResponseInterface |
Render a template |
|
setAttributes ( array $attributes ) |
Set the attributes for the renderer |
|
setTemplatePath ( string $templatePath ) |
Set the template path |
|