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. |
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 ​
setDefaultEscaperStrategy()
​
Arguments ​
$strategy
(mixed
) – The escaper strategy to set. If null, it will be determined based on the template name.