Engine
class Engine
Templating engine Latte.
Constants
Version |
|
VersionId |
|
deprecated VERSION |
|
deprecated VERSION_ID |
|
deprecated CONTENT_HTML |
|
deprecated CONTENT_XML |
|
deprecated CONTENT_JS |
|
deprecated CONTENT_CSS |
|
deprecated CONTENT_ICAL |
|
deprecated CONTENT_TEXT |
|
Methods
No description
Renders template to output.
Renders template to string.
Creates template object.
Compiles template to PHP code.
Parses template to AST node.
Compiles template to cache.
No description
No description
Values that affect the results of compilation and the name of the cache file.
Registers filter loader.
Returns all run-time filters.
Call a run-time filter.
No description
Registers run-time function.
Call a run-time function.
No description
Adds new provider.
Returns all providers.
No description
No description
No description
No description
Sets path to temporary directory.
Sets auto-refresh mode.
Enables declare(strict_types=1) in templates.
No description
No description
Sets the locale. It uses the same identifiers as the PHP intl extension.
No description
No description
No description
Details
at line 57
__construct()
No description
at line 72
void
render(string $name, object|array $params = [], string|null $block = null)
Renders template to output.
at line 84
string
renderToString(string $name, object|array $params = [], string|null $block = null)
Renders template to string.
at line 96
Template
createTemplate(string $name, array $params = [], bool $clearCache = true)
Creates template object.
at line 114
string
compile(string $name)
Compiles template to PHP code.
at line 146
TemplateNode
parse(string $template)
Parses template to AST node.
at line 166
void
applyPasses(TemplateNode $node)
Calls node visitors.
at line 184
string
generate(TemplateNode $node, string $name)
Generates compiled PHP code.
at line 200
void
warmupCache(string $name)
Compiles template to cache.
at line 228
string
getCacheFile(string $name)
No description
at line 234
string
getTemplateClass(string $name)
No description
at line 251
protected array
getCacheKey()
Values that affect the results of compilation and the name of the cache file.
at line 270
Engine
addFilter(string $name, callable $callback)
Registers run-time filter.
at line 284
Engine
addFilterLoader(callable $loader)
Registers filter loader.
at line 295
array
getFilters()
Returns all run-time filters.
at line 305
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 333
array
getExtensions()
No description
at line 342
Engine
addFunction(string $name, callable $callback)
Registers run-time function.
at line 357
mixed
invokeFunction(string $name, array $args)
Call a run-time function.
at line 366
array
getFunctions()
No description
at line 375
Engine
addProvider(string $name, mixed $provider)
Adds new provider.
at line 390
array
getProviders()
Returns all providers.
at line 396
Engine
setPolicy(Policy|null $policy)
No description
at line 403
Policy|null
getPolicy(bool $effective = false)
No description
at line 411
Engine
setExceptionHandler(callable $handler)
No description
at line 418
Engine
setSandboxMode(bool $state = true)
No description
at line 425
Engine
setContentType(string $type)
No description
at line 435
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 445
Engine
setAutoRefresh(bool $state = true)
Sets auto-refresh mode.
at line 455
Engine
setStrictTypes(bool $state = true)
Enables declare(strict_types=1) in templates.
at line 462
Engine
setStrictParsing(bool $state = true)
No description
at line 469
bool
isStrictParsing()
No description
at line 478
Engine
setLocale(string|null $locale)
Sets the locale. It uses the same identifiers as the PHP intl extension.
at line 488
string|null
getLocale()
No description
at line 501
Loader
getLoader()
No description
at line 507
Engine
enablePhpLinter(string|null $phpBinary)
No description
at line 560
__get(string $name)
No description