public function Twig_Extension_Escaper::getDefaultStrategy in Translation template extractor 7.3
Same name and namespace in other branches
- 6.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|false The default strategy to use for the template
File
- vendor/
Twig/ Extension/ Escaper.php, line 75
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) && false !== $this->defaultStrategy) {
return call_user_func($this->defaultStrategy, $filename);
}
return $this->defaultStrategy;
}