public function append($name, $val = null, $merge = false)
    {
        if (is_array($name)) {
            foreach ($name as $key => $val) {
                if (isset($this->data[$key]) && !is_array($this->data[$key])) {
                    settype($this->data[$key], 'array');
                }

                if ($merge === true && is_array($val)) {
                    $this->data[$key] = $val + $this->data[$key];
                } else {
                    $this->data[$key][] = $val;
                }
            }
        } elseif ($val !== null) {
            if (isset($this->data[$name]) && !is_array($this->data[$name])) {
                settype($this->data[$name], 'array');
            } elseif (!isset($this->data[$name])) {
                $this->data[$name] = array();
            }

            if ($merge === true && is_array($val)) {
                $this->data[$name] = $val + $this->data[$name];
            } else {
                $this->data[$name][] = $val;
            }
        }
    }