public function Twig_Extension_Escaper::getDefaultStrategy in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/Extension/Escaper.php \Twig_Extension_Escaper::getDefaultStrategy()
Gets the default strategy to use when not defined by the user.
Parameters
string $filename The template "filename":
Return value
string The default strategy to use for the template
File
- vendor/
Twig/ Extension/ Escaper.php, line 77
Class
Code
public function getDefaultStrategy($filename) {
// disable string callables to avoid calling a function named html or js,
// or any other upcoming escaping strategy
if (!is_string($this->defaultStrategy) && is_callable($this->defaultStrategy)) {
return call_user_func($this->defaultStrategy, $filename);
}
return $this->defaultStrategy;
}