Engine
class Engine
Templating engine Latte.
Constants
VERSION |
|
CONTENT_HTML |
Content types |
CONTENT_XHTML |
Content types |
CONTENT_XML |
Content types |
CONTENT_JS |
Content types |
CONTENT_CSS |
Content types |
CONTENT_ICAL |
Content types |
CONTENT_TEXT |
Content types |
Properties
callable[] | $onCompile |
Methods
No description
Renders template to output.
Renders template to string.
Creates template object.
Compiles template to PHP code.
Compiles template to cache.
No description
No description
Returns all run-time filters.
Call a run-time filter.
Adds new provider.
Returns all providers.
No description
Sets path to temporary directory.
Sets auto-refresh mode.
Enables declare(strict_types=1) in templates.
No description
Details
at line 63
__construct()
No description
at line 72
void
render(string $name, array $params = [], string $block = null)
Renders template to output.
at line 82
string
renderToString(string $name, array $params = [], string $block = null)
Renders template to string.
at line 92
Template
createTemplate(string $name, array $params = [])
Creates template object.
at line 105
string
compile(string $name)
Compiles template to PHP code.
at line 146
void
warmupCache(string $name)
Compiles template to cache.
at line 217
string
getCacheFile(string $name)
No description
at line 227
string
getTemplateClass(string $name)
No description
at line 238
Engine
addFilter(string|null $name, callable $callback)
Registers run-time filter.
at line 249
array
getFilters()
Returns all run-time filters.
at line 259
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 280
Engine
addProvider(string $name, $value)
Adds new provider.
at line 290
array
getProviders()
Returns all providers.
at line 299
Engine
setContentType(string $type)
No description
at line 310
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 321
Engine
setAutoRefresh(bool $on = true)
Sets auto-refresh mode.
at line 332
Engine
setStrictTypes(bool $on = true)
Enables declare(strict_types=1) in templates.
at line 339
Parser
getParser()
No description
at line 348
Compiler
getCompiler()
No description
at line 369
ILoader
getLoader()
No description
Traits
Better OOP experience.