You are here

public function Twig_SimpleFunction::getSafe in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/Twig/SimpleFunction.php \Twig_SimpleFunction::getSafe()

File

vendor/twig/twig/lib/Twig/SimpleFunction.php, line 75

Class

Twig_SimpleFunction
Represents a template function.

Code

public function getSafe(Twig_Node $functionArgs) {
  if (null !== $this->options['is_safe']) {
    return $this->options['is_safe'];
  }
  if (null !== $this->options['is_safe_callback']) {
    return call_user_func($this->options['is_safe_callback'], $functionArgs);
  }
  return array();
}