Template
abstract class Template implements Template
Parameters of Latte templates.
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.
__unserialize($_)
Prevents unserialization.
Details
at line 25
__construct(Engine $latte)
No description
at line 31
final Engine
getLatte()
No description
at line 40
void
render(string|null $file = null, array $params = [])
Renders template to output.
at line 50
string
renderToString(string|null $file = null, array $params = [])
Renders template to output.
at line 60
string
__toString()
Renders template to string.
at line 72
Template
addFilter(string|null $name, callable $callback)
Registers run-time filter.
at line 82
Template
addFunction(string $name, callable $callback)
Registers run-time function.
at line 92
Template
setTranslator(Translator|null $translator, string|null $language = null)
Sets translate adapter.
at line 114
Template
setFile(string $file)
Sets the path to the template file.
at line 121
final string|null
getFile()
Returns the path to the template file.
at line 130
final array
getParameters()
Returns array of all parameters.
at line 146
final
__unserialize($_)
Prevents unserialization.