Engine
class Engine
Templating engine Latte.
Constants
Version |
|
VersionId |
|
deprecated VERSION |
|
deprecated VERSION_ID |
|
CONTENT_HTML |
|
CONTENT_XML |
|
CONTENT_JS |
|
CONTENT_CSS |
|
CONTENT_ICAL |
|
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 66
__construct()
No description
at line 81
void
render(string $name, object|array $params = [], string|null $block = null)
Renders template to output.
at line 93
string
renderToString(string $name, object|array $params = [], string|null $block = null)
Renders template to string.
at line 105
Template
createTemplate(string $name, array $params = [], bool $clearCache = true)
Creates template object.
at line 123
string
compile(string $name)
Compiles template to PHP code.
at line 155
TemplateNode
parse(string $template)
Parses template to AST node.
at line 175
void
applyPasses(TemplateNode $node)
Calls node visitors.
at line 193
string
generate(TemplateNode $node, string $name)
Generates compiled PHP code.
at line 209
void
warmupCache(string $name)
Compiles template to cache.
at line 237
string
getCacheFile(string $name)
No description
at line 243
string
getTemplateClass(string $name)
No description
at line 260
protected array
getCacheKey()
Values that affect the results of compilation and the name of the cache file.
at line 279
Engine
addFilter(string $name, callable $callback)
Registers run-time filter.
at line 293
Engine
addFilterLoader(callable $loader)
Registers filter loader.
at line 304
array
getFilters()
Returns all run-time filters.
at line 314
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 323
Engine
addExtension(Extension $extension)
Adds new extension.
at line 342
array
getExtensions()
No description
at line 351
Engine
addFunction(string $name, callable $callback)
Registers run-time function.
at line 366
mixed
invokeFunction(string $name, array $args)
Call a run-time function.
at line 375
array
getFunctions()
No description
at line 384
Engine
addProvider(string $name, mixed $provider)
Adds new provider.
at line 399
array
getProviders()
Returns all providers.
at line 405
Engine
setPolicy(Policy|null $policy)
No description
at line 412
Policy|null
getPolicy(bool $effective = false)
No description
at line 420
Engine
setExceptionHandler(callable $handler)
No description
at line 427
Engine
setSandboxMode(bool $state = true)
No description
at line 434
Engine
setContentType(string $type)
No description
at line 444
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 454
Engine
setAutoRefresh(bool $state = true)
Sets auto-refresh mode.
at line 464
Engine
setStrictTypes(bool $state = true)
Enables declare(strict_types=1) in templates.
at line 471
Engine
setStrictParsing(bool $state = true)
No description
at line 478
bool
isStrictParsing()
No description
at line 487
Engine
setLocale(string|null $locale)
Sets the locale. It uses the same identifiers as the PHP intl extension.
at line 497
string|null
getLocale()
No description
at line 503
Engine
setLoader(Loader $loader)
No description
at line 510
Loader
getLoader()
No description
at line 516
Engine
enablePhpLinter(string|null $phpBinary)
No description
at line 559
__get(string $name)
No description