public function hasClass(string $name) : bool
    {
        return $this->getAttribute('class') ? in_array($name, explode(' ', $this->getAttribute('class'))) : false;
    }
public function hasClass(string $name) : bool
    {
        return $this->getAttribute('class') ? in_array($name, explode(' ', $this->getAttribute('class'))) : false;
    }
@param string $name

@return bool