Environment ​
- Type
- Class
- Namespace
- craft\web\twig
- Inherits
- craft\web\twig\Environment »
Twig\Environment
- Since
- 3.0.0
Base Twig template class.
Public Methods ​
Method | Description |
---|---|
__construct() | |
compileSource() | |
getDefaultEscaperStrategy() | Returns the default escaper strategy to use based on the template name. |
loadTemplate() | |
setDefaultEscaperStrategy() |
__construct()
​
Arguments ​
$loader
$options
compileSource()
​
Arguments ​
$source
getDefaultEscaperStrategy()
​
Returns the default escaper strategy to use based on the template name.
Arguments ​
$name
(string)
Returns ​
loadTemplate()
​
Arguments ​
$name
$index
setDefaultEscaperStrategy()
​
Arguments ​
$strategy
(mixed
, null) – The escaper strategy to set. If null, it will be determined based on the template name.