public function Crawler::selectLink in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Crawler.php \Symfony\Component\DomCrawler\Crawler::selectLink()
Selects links by name or alt value for clickable images.
Parameters
string $value The link text:
Return value
Crawler A new instance of Crawler with the filtered list of nodes
File
- vendor/
symfony/ dom-crawler/ Crawler.php, line 668
Class
- Crawler
- Crawler eases navigation of a list of \DOMElement objects.
Namespace
Symfony\Component\DomCrawlerCode
public function selectLink($value) {
$xpath = sprintf('descendant-or-self::a[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) ', static::xpathLiteral(' ' . $value . ' ')) . sprintf('or ./img[contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)]]', static::xpathLiteral(' ' . $value . ' '));
return $this
->filterRelativeXPath($xpath);
}