function EscaperExtension::getDefaultStrategy
Gets the default strategy to use when not defined by the user.
Parameters
string $name The template name:
Return value
string|false The default strategy to use for the template
File
-
vendor/
twig/ twig/ src/ Extension/ EscaperExtension.php, line 108
Class
Namespace
Twig\ExtensionCode
public function getDefaultStrategy(string $name) {
// 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, $name);
}
return $this->defaultStrategy;
}