public function classList(...$args)
    {
        $classes = [];

        foreach ($args as $arg) {
            if (empty($arg)) {
                continue;
            } elseif (is_string($arg)) {
                $arg = explode(" ", $arg);
            }
            $classes = array_merge($classes, $arg);
        }

        return "class=\"" . implode(" ", $classes) . "\"";
    }
public function classList(...$args)
    {
        $classes = [];

        foreach ($args as $arg) {
            if (empty($arg)) {
                continue;
            } elseif (is_string($arg)) {
                $arg = explode(" ", $arg);
            }
            $classes = array_merge($classes, $arg);
        }

        return "class=\"" . implode(" ", $classes) . "\"";
    }
public function classList ( ... $ args ) { $ classes = [ ] ; foreach ( $ args as $ arg ) { if ( empty ( $ arg ) ) { continue ; } elseif ( is_string ( $ arg ) ) { $ arg = explode ( " " , $ arg ) ; } $ classes = array_merge ( $ classes , $ arg ) ; } return "class=\"" . implode ( " " , $ classes ) . "\"" ; }
Create a class attribute from a string or array.

@param string|array $args variable amount of classlists.

@return string as complete class attribute
Create a class attribute from a string or array .