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.
void
blueprint(string|null $parentClass = null)
No description
__wakeup()
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 53
string
renderToString(string|null $file = null, array $params = [])
Renders template to output.
at line 63
string
__toString()
Renders template to string.
at line 75
Template
addFilter(string|null $name, callable $callback)
Registers run-time filter.
at line 85
Template
addFunction(string $name, callable $callback)
Registers run-time function.
at line 95
Template
setTranslator(Translator|null $translator, string|null $language = null)
Sets translate adapter.
at line 108
Template
setFile(string $file)
Sets the path to the template file.
at line 115
final string|null
getFile()
Returns the path to the template file.
at line 124
final array
getParameters()
Returns array of all parameters.
at line 137
void
blueprint(string|null $parentClass = null)
No description
at line 146
final
__wakeup()
Prevents unserialization.