public function setAttribute($name, $value)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $node->setAttribute($name, $value);
            }
        }
        return $this;
    }
public function setAttribute($name, $value)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $node->setAttribute($name, $value);
            }
        }
        return $this;
    }
public function setAttribute ( $ name , $ value ) { foreach ( $ this as $ node ) { if ( $ node instanceof \ DOMElement ) { /** @var \DOMElement $node */ $ node -> setAttribute ( $ name , $ value ) ; } } return $ this ; }
Sets an attribute on each element

@param string $name
@param string $value
@return HtmlPageCrawler $this for chaining
Sets an attribute on each element