You are here

public function Crawler::addNodeList in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dom-crawler/Crawler.php \Symfony\Component\DomCrawler\Crawler::addNodeList()

Adds a \DOMNodeList to the list of nodes.

Parameters

\DOMNodeList $nodes A \DOMNodeList instance:

1 call to Crawler::addNodeList()
Crawler::add in vendor/symfony/dom-crawler/Crawler.php
Adds a node to the current list of nodes.

File

vendor/symfony/dom-crawler/Crawler.php, line 273

Class

Crawler
Crawler eases navigation of a list of \DOMElement objects.

Namespace

Symfony\Component\DomCrawler

Code

public function addNodeList(\DOMNodeList $nodes) {
  foreach ($nodes as $node) {
    if ($node instanceof \DOMNode) {
      $this
        ->addNode($node);
    }
  }
}