public function hasClass($className)
    {
        if(strlen($className) < 1)
        {
            throw new HTMLTagException("Class name is empty");
        }

        if($this->hasAttribute("class"))
        {
            $classes = $this->getClasses();

            foreach(explode(" ",$classes) as $class) {
                if(strtolower($class) == strtolower($className)) {
                    return true;    // We found it.
                }
            }

        }

        return false;
    }
public function hasClass($className)
    {
        if(strlen($className) < 1)
        {
            throw new HTMLTagException("Class name is empty");
        }

        if($this->hasAttribute("class"))
        {
            $classes = $this->getClasses();

            foreach(explode(" ",$classes) as $class) {
                if(strtolower($class) == strtolower($className)) {
                    return true;    // We found it.
                }
            }

        }

        return false;
    }
public function hasClass ( $ className ) { if ( strlen ( $ className ) < 1 ) { throw new HTMLTagException ( "Class name is empty" ) ; } if ( $ this -> hasAttribute ( "class" ) ) { $ classes = $ this -> getClasses ( ) ; foreach ( explode ( " " , $ classes ) as $ class ) { if ( strtolower ( $ class ) == strtolower ( $ className ) ) { return true ; // We found it. } } } return false ; }
Checks to see if the given class name is inside of the class attribute
@param   string  $className
@return  bool
@throws  HTMLTagException
Checks to see if the given class name is inside of the class attribute