src/php/CTXParser/Stack.php
public function offsetSet($key, $value)
    {
        $key = $this->count - $key - 1;
        if (!isset($this->data[$key])) {
            throw new \OutOfRangeException("Out of range.");
        }

        $this->data[$key] = $value;
    }
public function offsetSet($key, $value)
    {
        $key = $this->count - $key - 1;
        if (!isset($this->data[$key])) {
            throw new \OutOfRangeException("Out of range.");
        }

        $this->data[$key] = $value;
    }
public function offsetSet ( $ key , $ value ) { $ key = $ this -> count - $ key - 1 ; if ( ! isset ( $ this -> data [ $ key ] ) ) { throw new \ OutOfRangeException ( "Out of range." ) ; } $ this -> data [ $ key ] = $ value ; }
Set the element with the given offset.

This method is part of the ArrayAccess interface to allow access to the
data of this object as if it was an array.

Setting of not yet existing offsets in the stack is not allowed and will
return a ezcBaseValueException.

@param string $key
@param mixed $value
@return void

@throws ezcBaseValueException
Setting unknown offsets is not allowed
Set the element with the given offset .