public function offsetSet($offset, $value)
    {
        if (is_array($this->object)) {
            $this->object[$offset] = $value;

            return;
        }

        $this->object->$offset = $value;
    }
public function offsetSet($offset, $value)
    {
        if (is_array($this->object)) {
            $this->object[$offset] = $value;

            return;
        }

        $this->object->$offset = $value;
    }
public function offsetSet ( $ offset , $ value ) { if ( is_array ( $ this -> object ) ) { $ this -> object [ $ offset ] = $ value ; return ; } $ this -> object -> $ offset = $ value ; }
Set variable or key value using array access.

@param mixed $offset
@param mixed $value
Set variable or key value using array access .