You are here

public function Twig_Extension_Core::setEscaper in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Extension/Core.php \Twig_Extension_Core::setEscaper()

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

Parameters

string $strategy The strategy name that should be used as a strategy in the escape call:

callable $callable A valid PHP callable:

File

vendor/Twig/Extension/Core.php, line 29

Class

Twig_Extension_Core

Code

public function setEscaper($strategy, $callable) {
  $this->escapers[$strategy] = $callable;
}