You are here

private function Crawler::filterRelativeXPath in Zircon Profile 8

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

Filters the list of nodes with an XPath expression.

The XPath expression should already be processed to apply it in the context of each node.

Parameters

string $xpath:

Return value

Crawler

4 calls to Crawler::filterRelativeXPath()
Crawler::filter in vendor/symfony/dom-crawler/Crawler.php
Filters the list of nodes with a CSS selector.
Crawler::filterXPath in vendor/symfony/dom-crawler/Crawler.php
Filters the list of nodes with an XPath expression.
Crawler::selectButton in vendor/symfony/dom-crawler/Crawler.php
Selects a button by name or alt value for images.
Crawler::selectLink in vendor/symfony/dom-crawler/Crawler.php
Selects links by name or alt value for clickable images.

File

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

Class

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

Namespace

Symfony\Component\DomCrawler

Code

private function filterRelativeXPath($xpath) {
  $prefixes = $this
    ->findNamespacePrefixes($xpath);
  $crawler = $this
    ->createSubCrawler(null);
  foreach ($this as $node) {
    $domxpath = $this
      ->createDOMXPath($node->ownerDocument, $prefixes);
    $crawler
      ->add($domxpath
      ->query($xpath, $node));
  }
  return $crawler;
}