Jobbuddy
Chargement...
Recherche...
Aucune correspondance
Référence de la classe EscaperRuntime
Graphe d'héritage de EscaperRuntime:
RuntimeExtensionInterface

Fonctions membres publiques

 __construct (private $charset='UTF-8',)
 setEscaper ($strategy, callable $callable)
 getEscapers ()
 setSafeClasses (array $safeClasses=[])
 addSafeClass (string $class, array $strategies)
 escape ($string, string $strategy='html', ?string $charset=null, bool $autoescape=false)

Champs de données

 $safeClasses = []
 $safeLookup = []

Documentation des fonctions membres

◆ addSafeClass()

addSafeClass ( string $class,
array $strategies )
Paramètres
class-string<

Stringable> $class

Paramètres
string[]$strategies
Renvoie
void

◆ escape()

escape ( $string,
string $strategy = 'html',
?string $charset = null,
bool $autoescape = false )

Escapes a string.

Paramètres
mixed$stringThe value to be escaped
string$strategyThe escaping strategy
string | null$charsetThe charset
bool$autoescapeWhether the function is called by the auto-escaping feature (true) or by the developer (false)
Exceptions
RuntimeError

This function is adapted from code coming from Zend Framework.

◆ getEscapers()

getEscapers ( )

Gets all defined escapers.

Renvoie
array<string, callable(string $string, string $charset): string> An array of escapers

◆ 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(string$string, string $charset): string $callable A valid PHP callable
Renvoie
void

◆ setSafeClasses()

setSafeClasses ( array $safeClasses = [])
Paramètres
array<class-string<

Stringable>, string[]> $safeClasses

Renvoie
void

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