You are here

public function Translator::selectorToXPath in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/XPath/Translator.php \Symfony\Component\CssSelector\XPath\Translator::selectorToXPath()

Translates a parsed selector node to an XPath expression.

Parameters

SelectorNode $selector:

string $prefix:

Return value

string

Overrides TranslatorInterface::selectorToXPath

1 call to Translator::selectorToXPath()
Translator::cssToXPath in vendor/symfony/css-selector/XPath/Translator.php
Translates a CSS selector to an XPath expression.

File

vendor/symfony/css-selector/XPath/Translator.php, line 140

Class

Translator
XPath expression translator interface.

Namespace

Symfony\Component\CssSelector\XPath

Code

public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::') {
  return ($prefix ?: '') . $this
    ->nodeToXPath($selector);
}