Lines Matching refs:strategy
96 … * @param string $strategy The strategy name that should be used as a strategy in the escape call
99 public function setEscaper($strategy, callable $callable) argument
101 $this->escapers[$strategy] = $callable;
131 foreach ($strategies as $strategy) {
132 $this->safeLookup[$strategy][$class] = true;
165 * @param string $strategy The escaping strategy
171 function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoes… argument
193 if (isset($ext->safeLookup[$strategy][$c]) || isset($ext->safeLookup['all'][$c])) {
199 } elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) {
212 switch ($strategy) {
397 if (array_key_exists($strategy, $legacyEscapers)) {
398 return $legacyEscapers[$strategy]($env, $string, $charset);
402 if (array_key_exists($strategy, $escapers)) {
403 return $escapers[$strategy]($env, $string, $charset);
409 …ntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies…