public function getClasses()
    {
        $classes = [];
        $current = $this->head;
        while ($current && $current->value) {
            $classes[] = $current->value;
            $current = $current->next;
        }

        return array_filter($classes);
    }
public function getClasses()
    {
        $classes = [];
        $current = $this->head;
        while ($current && $current->value) {
            $classes[] = $current->value;
            $current = $current->next;
        }

        return array_filter($classes);
    }
public function getClasses ( ) { $ classes = [ ] ; $ current = $ this -> head ; while ( $ current && $ current -> value ) { $ classes [ ] = $ current -> value ; $ current = $ current -> next ; } return array_filter ( $ classes ) ; }
Traverse the ClassList and return a list of classes.

@return array
Traverse the ClassList and return a list of classes .