public function addClass($className)
    {
        $attr = $this->getAttribute('class');
        if ($attr != '') {
            $attr .= ' ';
        }
        $attr .= (string) $className;

        $this->setAttribute('class', $attr);
    }
public function addClass($className)
    {
        $attr = $this->getAttribute('class');
        if ($attr != '') {
            $attr .= ' ';
        }
        $attr .= (string) $className;

        $this->setAttribute('class', $attr);
    }
public function addClass ( $ className ) { $ attr = $ this -> getAttribute ( 'class' ) ; if ( $ attr != '' ) { $ attr .= ' ' ; } $ attr .= ( string ) $ className ; $ this -> setAttribute ( 'class' , $ attr ) ; }
Add a css class.

@param string $className
Add a css class .