public function offsetSet($key, $value)
    {
        if (null === $key) {
            $this->push($value);
        } else {
            $this->set($key, $value);
        }
    }
public function offsetSet($key, $value)
    {
        if (null === $key) {
            $this->push($value);
        } else {
            $this->set($key, $value);
        }
    }
public function offsetSet ( $ key , $ value ) { if ( null === $ key ) { $ this -> push ( $ value ) ; } else { $ this -> set ( $ key , $ value ) ; } }
Set the value at a given key.

If key is null, the value is appended to the array using numeric
indexes, just like native PHP. Unlike native-PHP, $key can be of any
type: boolean, int, float, string, array, object, closure, resource.

@param mixed $key
@param mixed $value
@return void
Set the value at a given key .