public function removeClass($name)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $classes = preg_split('/\s+/s', $node->getAttribute('class'));
                $count = count($classes);
                for ($i = 0; $i < $count; $i++) {
                    if ($classes[$i] == $name) {
                        unset($classes[$i]);
                    }
                }
                $node->setAttribute('class', trim(join(' ', $classes)));
            }
        }
        return $this;
    }
public function removeClass($name)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $classes = preg_split('/\s+/s', $node->getAttribute('class'));
                $count = count($classes);
                for ($i = 0; $i < $count; $i++) {
                    if ($classes[$i] == $name) {
                        unset($classes[$i]);
                    }
                }
                $node->setAttribute('class', trim(join(' ', $classes)));
            }
        }
        return $this;
    }
public function removeClass ( $ name ) { foreach ( $ this as $ node ) { if ( $ node instanceof \ DOMElement ) { /** @var \DOMElement $node */ $ classes = preg_split ( '/\s+/s' , $ node -> getAttribute ( 'class' ) ) ; $ count = count ( $ classes ) ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { if ( $ classes [ $ i ] == $ name ) { unset ( $ classes [ $ i ] ) ; } } $ node -> setAttribute ( 'class' , trim ( join ( ' ' , $ classes ) ) ) ; } } return $ this ; }
Remove a class from each element in the list

@param string $name
@return HtmlPageCrawler $this for chaining
@api
Remove a class from each element in the list