public function offsetSet($offset, $value)
    {
        $data = $this->data;
        if (is_null($offset)) {
            $data[] = $value;
            $this->set($data);

            return;
        }
        $offset = filter_var($offset, FILTER_VALIDATE_INT, array('min_range' => 0));
        if (false === $offset) {
            throw new InvalidArgumentException('Offset must be an integer');
        }
        $data[$offset] = $value;
        $this->set($data);
    }