public function visitVariableNode(VariableNode $node)
    {
        $name = $node->getName();

        if (array_key_exists($name, $this->variables)) {
            return $this->variables[$name];
        }

        throw new UnknownVariableException($name);
    }
public function visitVariableNode(VariableNode $node)
    {
        $name = $node->getName();

        if (array_key_exists($name, $this->variables)) {
            return $this->variables[$name];
        }

        throw new UnknownVariableException($name);
    }
public function visitVariableNode ( VariableNode $ node ) { $ name = $ node -> getName ( ) ; if ( array_key_exists ( $ name , $ this -> variables ) ) { return $ this -> variables [ $ name ] ; } throw new UnknownVariableException ( $ name ) ; }
Evaluate a VariableNode

Returns the current value of a VariableNode, as defined
either by the constructor or set using the `Evaluator::setVariables()` method.

VariableNode is *not* set.
@retval float
@see Evaluator::setVariables() to define the variables

@param  VariableNode             $node AST to be evaluated
@throws UnknownVariableException if the variable respresented by the
Evaluate a VariableNode