Engine
class Engine
Templating engine Latte.
Constants
VERSION |
|
VERSION_ID |
|
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 | ||
internal | $probe |
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
Registers filter loader.
Returns all run-time filters.
Call a run-time filter.
Registers run-time function.
Call a run-time function.
Adds new provider.
Returns all providers.
No description
No description
No description
Sets path to temporary directory.
Sets auto-refresh mode.
Enables declare(strict_types=1) in templates.
No description
Details
at line 76
__construct()
No description
at line 97
void
render(string $name, object|array $params = [], string|null $block = null)
Renders template to output.
at line 110
string
renderToString(string $name, object|array $params = [], string|null $block = null)
Renders template to string.
at line 123
Template
createTemplate(string $name, array $params = [])
Creates template object.
at line 138
string
compile(string $name)
Compiles template to PHP code.
at line 183
void
warmupCache(string $name)
Compiles template to cache.
at line 273
string
getCacheFile(string $name)
No description
at line 283
string
getTemplateClass(string $name)
No description
at line 294
Engine
addFilter(string|null $name, callable $callback)
Registers run-time filter.
at line 309
Engine
addFilterLoader(callable $callback)
Registers filter loader.
at line 324
array
getFilters()
Returns all run-time filters.
at line 335
mixed
invokeFilter(string $name, array $args)
Call a run-time filter.
at line 356
Engine
addFunction(string $name, callable $callback)
Registers run-time function.
at line 372
mixed
invokeFunction(string $name, array $args)
Call a run-time function.
at line 390
Engine
addProvider(string $name, mixed $value)
Adds new provider.
at line 405
array
getProviders()
Returns all providers.
at line 412
Engine
setPolicy(Policy|null $policy)
No description
at line 420
Engine
setExceptionHandler(callable $callback)
No description
at line 428
Engine
setSandboxMode(bool $on = true)
No description
at line 436
Engine
setContentType(string $type)
No description
at line 447
Engine
setTempDirectory(string|null $path)
Sets path to temporary directory.
at line 458
Engine
setAutoRefresh(bool $on = true)
Sets auto-refresh mode.
at line 469
Engine
setStrictTypes(bool $on = true)
Enables declare(strict_types=1) in templates.
at line 476
Parser
getParser()
No description
at line 486
Compiler
getCompiler()
No description
at line 506
Loader
getLoader()
No description
Traits
Better OOP experience.