public function prepareValue(Context $context)
    {
        if (isset($this->name) && isset($context[$this->name])) {
            $value = $context[$this->name];
        } elseif ($this->value instanceof VariableOperand) {
            $value = $this->value->prepareValue($context);
        } else {
            $value = $this->value;
        }

        return ($value instanceof Value) ? $value : new Value($value);
    }
public function prepareValue(Context $context)
    {
        if (isset($this->name) && isset($context[$this->name])) {
            $value = $context[$this->name];
        } elseif ($this->value instanceof VariableOperand) {
            $value = $this->value->prepareValue($context);
        } else {
            $value = $this->value;
        }

        return ($value instanceof Value) ? $value : new Value($value);
    }
public function prepareValue ( Context $ context ) { if ( isset ( $ this -> name ) && isset ( $ context [ $ this -> name ] ) ) { $ value = $ context [ $ this -> name ] ; } elseif ( $ this -> value instanceof VariableOperand ) { $ value = $ this -> value -> prepareValue ( $ context ) ; } else { $ value = $ this -> value ; } return ( $ value instanceof Value ) ? $ value : new Value ( $ value ) ; }
Prepare a Value for this Variable given the current Context.

@param Context $context The current Context

@return Value
Prepare a Value for this Variable given the current Context .