Jobbuddy
Chargement...
Recherche...
Aucune correspondance
Référence de la classe EscaperExtension
Graphe d'héritage de EscaperExtension:
AbstractExtension LastModifiedExtensionInterface ExtensionInterface

Fonctions membres publiques

 __construct ($defaultStrategy='html')
 getTokenParsers ()
 getNodeVisitors ()
 getFilters ()
 getLastModified ()
 setEnvironment (Environment $environment)
 setEscaperRuntime (EscaperRuntime $escaper)
 setDefaultStrategy ($defaultStrategy)
 getDefaultStrategy (string $name)
 setEscaper ($strategy, callable $callable)
 getEscapers ()
 setSafeClasses (array $safeClasses=[])
 addSafeClass (string $class, array $strategies)
Fonctions membres publiques hérités de AbstractExtension
 getTests ()
 getFunctions ()
 getOperators ()
 getExpressionParsers ()

Fonctions membres publiques statiques

static escapeFilterIsSafe (Node $filterArgs)

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( $defaultStrategy = 'html')
Paramètres
string | false | callable$defaultStrategyAn escaping strategy
Voir également
setDefaultStrategy()

Documentation des fonctions membres

◆ addSafeClass()

addSafeClass ( string $class,
array $strategies )
Renvoie
void
Obsolète
since Twig 3.10

◆ getDefaultStrategy()

getDefaultStrategy ( string $name)

Gets the default strategy to use when not defined by the user.

Paramètres
string$nameThe template name
Renvoie
string|false The default strategy to use for the template

◆ getEscapers()

getEscapers ( )

Gets all defined escapers.

Renvoie
array<string, callable(Environment, string, string): string> An array of escapers
Obsolète
since Twig 3.10

◆ getFilters()

getFilters ( )

Returns a list of filters to add to the existing list.

Renvoie
TwigFilter[]

Réimplémentée à partir de AbstractExtension.

◆ getLastModified()

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()

getNodeVisitors ( )

Returns the node visitor instances to add to the existing list.

Renvoie
NodeVisitorInterface[]

Réimplémentée à partir de AbstractExtension.

◆ getTokenParsers()

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()

setEnvironment ( Environment $environment)
Obsolète
since Twig 3.10

◆ setEscaper()

setEscaper ( $strategy,
callable $callable )

Defines a new escaper to be used via the escape filter.

Paramètres
string$strategyThe 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()

setEscaperRuntime ( EscaperRuntime $escaper)
Renvoie
void
Obsolète
since Twig 3.10

◆ setSafeClasses()

setSafeClasses ( array $safeClasses = [])
Renvoie
void
Obsolète
since Twig 3.10

La documentation de cette classe a été générée à partir du fichier suivant :