示例#1
0
 public function __construct($functionName, array $arguments = [])
 {
     parent::__construct($functionName);
     $this->setArguments($arguments);
 }
 private function functionNeedsEnvironment(IdentifierNode $node)
 {
     $function = $this->environment->getFunction($node->getData('name'));
     if ($function->getOption('needs_environment')) {
         return true;
     }
     return !is_string($function->getCallback());
 }