You are here

public function Twig_Extension_Core::setEscaper in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/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/twig/lib/Twig/Extension/Core.php, line 29

Class

Twig_Extension_Core

Code

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