src/Html/Element.php
public function hasClass($className)
    {
        if (!$class = $this->dom->getAttribute("class")) {
            return false;
        }

        $classes = explode(" ", $class);

        return in_array($className, $classes, true);
    }
public function hasClass($className)
    {
        if (!$class = $this->dom->getAttribute("class")) {
            return false;
        }

        $classes = explode(" ", $class);

        return in_array($className, $classes, true);
    }
public function hasClass ( $ className ) { if ( ! $ class = $ this -> dom -> getAttribute ( "class" ) ) { return false ; } $ classes = explode ( " " , $ class ) ; return in_array ( $ className , $ classes , true ) ; }
Check if this element has the specified class applied to it.

@param string $className The name of the class to check for (case-sensitive)

@return bool
Check if this element has the specified class applied to it .