public function setAttributes(array $attribs = array(), $merge = true)
    {
        if ($merge) {
            $this->attributes = array_merge($this->attributes, $attribs);
        } else {
            $this->attributes = $attribs;
        }

        return $this;
    }