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.
Values that check the expiration of the compiled template.
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 56
__construct()
No description
at line 70
void
render(string $name, object|array $params = [], string|null $block = null)
Renders template to output.
at line 82
string
renderToString(string $name, object|array $params = [], string|null $block = null)
Renders template to string.
at line 94
Template
createTemplate(string $name, array $params = [], $clearCache = true)
Creates template object.
at line 116
string
compile(string $name)
Compiles template to PHP code.
at line 148
TemplateNode
parse(string $template)
Parses template to AST node.
at line 168
void
applyPasses(TemplateNode $node)
Calls node visitors.
at line 186
string
generate(TemplateNode $node, string $name)
Generates compiled PHP code.
at line 202
void
warmupCache(string $name)
Compiles template to cache.
at line 302
string
getCacheFile(string $name)
No description
at line 311
string
getTemplateClass(string $name)
No description
at line 328
protected array
getCacheKey()
Values that affect the results of compilation and the name of the cache file.
at line 348
protected array
getCacheSignature(string $name)
Values that check the expiration of the compiled template.
at line 364
Engine
addFilter(string $name, callable $callback)
Registers run-time filter.
at line 378
Engine
addFilterLoader(callable $loader)
Registers filter loader.
at line 389
array
getFilters()
Returns all run-time filters.
at line 399
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 427
array
getExtensions()
No description
at line 436
Engine
addFunction(string $name, callable $callback)
Registers run-time function.
at line 451
mixed
invokeFunction(string $name, array $args)
Call a run-time function.
at line 460
array
getFunctions()
No description
at line 469
Engine
addProvider(string $name, mixed $provider)
Adds new provider.
at line 484
array
getProviders()
Returns all providers.
at line 490
Engine
setPolicy(Policy|null $policy)
No description
at line 497
Policy|null
getPolicy(bool $effective = false)
No description
at line 505
Engine
setExceptionHandler(callable $handler)
No description
at line 512
Engine
setSandboxMode(bool $state = true)
No description
at line 519
Engine
setContentType(string $type)
No description
at line 529
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 539
Engine
setAutoRefresh(bool $state = true)
Sets auto-refresh mode.
at line 549
Engine
setStrictTypes(bool $state = true)
Enables declare(strict_types=1) in templates.
at line 556
Engine
setStrictParsing(bool $state = true)
No description
at line 563
bool
isStrictParsing()
No description
at line 572
Engine
setLocale(string|null $locale)
Sets the locale. It uses the same identifiers as the PHP intl extension.
at line 582
string|null
getLocale()
No description
at line 595
Loader
getLoader()
No description
at line 601
Engine
enablePhpLinter(string|null $phpBinary)
No description
at line 643
__get(string $name)
No description