public function hclass($classes, $raw = false)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }
        $classes = preg_split('/ +/', trim($classes));
        $classes = implode(' ', $classes);

        if ($raw) {
            return $classes;
        }

        return $classes ? ' class="' . htmlspecialchars($classes) . '"' : '';
    }
public function hclass($classes, $raw = false)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }
        $classes = preg_split('/ +/', trim($classes));
        $classes = implode(' ', $classes);

        if ($raw) {
            return $classes;
        }

        return $classes ? ' class="' . htmlspecialchars($classes) . '"' : '';
    }
public function hclass ( $ classes , $ raw = false ) { if ( is_array ( $ classes ) ) { $ classes = implode ( ' ' , $ classes ) ; } $ classes = preg_split ( '/ +/' , trim ( $ classes ) ) ; $ classes = implode ( ' ' , $ classes ) ; if ( $ raw ) { return $ classes ; } return $ classes ? ' class="' . htmlspecialchars ( $ classes ) . '"' : '' ; }
Generates pretty class attributes.

@param array|string $classes
@param bool         $raw

@return string Class attribute
Generates pretty class attributes .