Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Crawler.php

function Crawler::findNamespacePrefixes

2 calls to Crawler::findNamespacePrefixes()
Crawler::evaluate in vendor/symfony/dom-crawler/Crawler.php
Evaluates an XPath expression.
Crawler::filterRelativeXPath in vendor/symfony/dom-crawler/Crawler.php
Filters the list of nodes with an XPath expression.

File

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

Class

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

Namespace

Symfony\Component\DomCrawler

Code

private function findNamespacePrefixes(string $xpath) : array {
    if (preg_match_all('/(?P<prefix>[a-z_][a-z_0-9\\-\\.]*+):[^"\\/:]/i', $xpath, $matches)) {
        return array_unique($matches['prefix']);
    }
    return [];
}
RSS feed
Powered by Drupal