|
|
static | escapeFilterIsSafe (Node $filterArgs) |
◆ __construct()
| __construct |
( |
| $defaultStrategy = 'html' | ) |
|
- Paramètres
-
| string | false | callable | $defaultStrategy | An escaping strategy |
- Voir également
- setDefaultStrategy()
◆ addSafeClass()
| addSafeClass |
( |
string | $class, |
|
|
array | $strategies ) |
◆ getDefaultStrategy()
| getDefaultStrategy |
( |
string | $name | ) |
|
Gets the default strategy to use when not defined by the user.
- Paramètres
-
| string | $name | The template name |
- Renvoie
- string|false The default strategy to use for the template
◆ getEscapers()
Gets all defined escapers.
- Renvoie
- array<string, callable(Environment, string, string): string> An array of escapers
- Obsolète
- since Twig 3.10
◆ getFilters()
Returns a list of filters to add to the existing list.
- Renvoie
- TwigFilter[]
Réimplémentée à partir de AbstractExtension.
◆ getLastModified()
Returns the last modification time of the extension for cache invalidation.
This timestamp should be the last time the source code of the extension class and all its dependencies were modified (including the Runtime class).
Réimplémentée à partir de AbstractExtension.
◆ getNodeVisitors()
Returns the node visitor instances to add to the existing list.
- Renvoie
- NodeVisitorInterface[]
Réimplémentée à partir de AbstractExtension.
◆ getTokenParsers()
Returns the token parser instances to add to the existing list.
- Renvoie
- TokenParserInterface[]
Réimplémentée à partir de AbstractExtension.
◆ setDefaultStrategy()
| setDefaultStrategy |
( |
| $defaultStrategy | ) |
|
Sets the default strategy to use when not defined by the user.
The strategy can be a valid PHP callback that takes the template name as an argument and returns the strategy to use.
- Paramètres
-
| string|false|callable(string | $templateName): string $defaultStrategy An escaping strategy |
◆ setEnvironment()
◆ setEscaper()
| setEscaper |
( |
| $strategy, |
|
|
callable | $callable ) |
Defines a new escaper to be used via the escape filter.
- Paramètres
-
| string | $strategy | The strategy name that should be used as a strategy in the escape call |
| callable(Environment,string,string) | string $callable A valid PHP callable |
- Renvoie
- void
- Obsolète
- since Twig 3.10
◆ setEscaperRuntime()
◆ setSafeClasses()
| setSafeClasses |
( |
array | $safeClasses = [] | ) |
|
La documentation de cette classe a été générée à partir du fichier suivant :
- vendor/twig/twig/src/Extension/EscaperExtension.php