function Crawler::images
Returns an array of Image objects for the nodes in the list.
Return value
Image[]
File
-
vendor/
symfony/ dom-crawler/ Crawler.php, line 825
Class
- Crawler
- Crawler eases navigation of a list of \DOMNode objects.
Namespace
Symfony\Component\DomCrawlerCode
public function images() : array {
$images = [];
foreach ($this as $node) {
if (!$node instanceof \DOMElement) {
throw new \InvalidArgumentException(\sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_debug_type($node)));
}
$images[] = new Image($node, $this->baseHref);
}
return $images;
}