Template
class Template implements Template
Latte powered template.
Methods
__construct(Engine $latte)
No description
Engine
getLatte()
No description
void
render(string|null $file = null, array $params = [])
Renders template to output.
string
renderToString(string|null $file = null, array $params = [])
Renders template to output.
string
__toString()
Renders template to string.
addFunction(string $name, callable $callback)
Registers run-time function.
setTranslator(Translator|null $translator, string|null $language = null)
Sets translate adapter.
string|null
getFile()
Returns the path to the template file.
array
getParameters()
Returns array of all parameters.
__wakeup()
Prevents unserialization.
Details
at line 28
__construct(Engine $latte)
No description
at line 34
final Engine
getLatte()
No description
at line 43
void
render(string|null $file = null, array $params = [])
Renders template to output.
at line 53
string
renderToString(string|null $file = null, array $params = [])
Renders template to output.
at line 64
string
__toString()
Renders template to string.
at line 86
Template
addFilter(string|null $name, callable $callback)
Registers run-time filter.
at line 97
Template
addFunction(string $name, callable $callback)
Registers run-time function.
at line 108
Template
setTranslator(Translator|null $translator, string|null $language = null)
Sets translate adapter.
at line 133
Template
setFile(string $file)
Sets the path to the template file.
at line 140
final string|null
getFile()
Returns the path to the template file.
at line 149
final array
getParameters()
Returns array of all parameters.
at line 165
final
__wakeup()
Prevents unserialization.