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
No description
No description
Details
at line 55
__construct()
No description
at line 69
void
render(string $name, object|array $params = [], string|null $block = null)
Renders template to output.
at line 81
string
renderToString(string $name, object|array $params = [], string|null $block = null)
Renders template to string.
at line 93
Template
createTemplate(string $name, array $params = [], $clearCache = true)
Creates template object.
at line 115
string
compile(string $name)
Compiles template to PHP code.
at line 147
TemplateNode
parse(string $template)
Parses template to AST node.
at line 167
void
applyPasses(TemplateNode $node)
Calls node visitors.
at line 185
string
generate(TemplateNode $node, string $name)
Generates compiled PHP code.
at line 201
void
warmupCache(string $name)
Compiles template to cache.
at line 301
string
getCacheFile(string $name)
No description
at line 310
string
getTemplateClass(string $name)
No description
at line 327
protected array
getCacheKey()
Values that affect the results of compilation and the name of the cache file.
at line 347
protected array
getCacheSignature(string $name)
Values that check the expiration of the compiled template.
at line 363
Engine
addFilter(string $name, callable $callback)
Registers run-time filter.
at line 377
Engine
addFilterLoader(callable $loader)
Registers filter loader.
at line 388
array
getFilters()
Returns all run-time filters.
at line 398
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 426
array
getExtensions()
No description
at line 435
Engine
addFunction(string $name, callable $callback)
Registers run-time function.
at line 450
mixed
invokeFunction(string $name, array $args)
Call a run-time function.
at line 459
array
getFunctions()
No description
at line 468
Engine
addProvider(string $name, mixed $provider)
Adds new provider.
at line 483
array
getProviders()
Returns all providers.
at line 489
Engine
setPolicy(Policy|null $policy)
No description
at line 496
Policy|null
getPolicy(bool $effective = false)
No description
at line 504
Engine
setExceptionHandler(callable $handler)
No description
at line 511
Engine
setSandboxMode(bool $state = true)
No description
at line 518
Engine
setContentType(string $type)
No description
at line 528
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 538
Engine
setAutoRefresh(bool $state = true)
Sets auto-refresh mode.
at line 548
Engine
setStrictTypes(bool $state = true)
Enables declare(strict_types=1) in templates.
at line 555
Engine
setStrictParsing(bool $state = true)
No description
at line 562
bool
isStrictParsing()
No description
at line 575
Loader
getLoader()
No description
at line 581
Engine
enablePhpLinter(string|null $phpBinary)
No description
at line 623
__get(string $name)
No description