public function addClass($class)
    {
        if (!$this->hasClass($class)) {
            $current = (string)$this['class'];

            if ($current !== ''
                && substr($current, -1) !== ' '
            ) {
                $this['class'] .= ' ';
            }

            $this['class'] .= $class;
        }

        return $this;
    }