You are here

public function Twig_Filter::getSafe in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Filter.php \Twig_Filter::getSafe()

Overrides Twig_FilterInterface::getSafe

File

vendor/Twig/Filter.php, line 56

Class

Twig_Filter
Represents a template filter.

Code

public function getSafe(Twig_Node $filterArgs) {
  if (isset($this->options['is_safe'])) {
    return $this->options['is_safe'];
  }
  if (isset($this->options['is_safe_callback'])) {
    return call_user_func($this->options['is_safe_callback'], $filterArgs);
  }
}