Example #1
0
 /**
  * Parse this node.
  * Sets the variable in the current context.
  *
  * @param Context $context the context in which this node is parsed
  * @return array the parsed node - an empty array
  */
 public function parse($context)
 {
     if (!$this->isDefault || !$context->hasVariable($this->name)) {
         $context->setVariable($this->name, $this->evaluate($this->value, $context));
     }
     $this->parseChildren($context);
     // Parse any warnings
     return [];
 }