public function addClass($class)
    {
        if (isset($this->attr['class'])) {
            $classes = explode(' ', $this->attr['class']);
            if (!in_array($class, $classes)) {
                $classes[] = $class;
            }

            $this->attr['class'] = implode(' ', $classes);
        } else {
            $this->attr['class'] = $class;
        }
    }