public function Crawler::children in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Crawler.php \Symfony\Component\DomCrawler\Crawler::children()
Returns the children nodes of the current selection.
Return value
Crawler A Crawler instance with the children nodes
Throws
\InvalidArgumentException When current node is empty
File
- vendor/
symfony/ dom-crawler/ Crawler.php, line 497
Class
- Crawler
- Crawler eases navigation of a list of \DOMElement objects.
Namespace
Symfony\Component\DomCrawlerCode
public function children() {
if (!count($this)) {
throw new \InvalidArgumentException('The current node list is empty.');
}
$node = $this
->getNode(0)->firstChild;
return $this
->createSubCrawler($node ? $this
->sibling($node) : array());
}