function CssSelectorConverter::toXPath
Translates a CSS expression to its XPath equivalent.
Optionally, a prefix can be added to the resulting XPath expression with the $prefix parameter.
File
-
vendor/
symfony/ css-selector/ CssSelectorConverter.php, line 63
Class
- CssSelectorConverter
- CssSelectorConverter is the main entry point of the component and can convert CSS selectors to XPath expressions.
Namespace
Symfony\Component\CssSelectorCode
public function toXPath(string $cssExpr, string $prefix = 'descendant-or-self::') : string {
return $this->cache[$prefix][$cssExpr] ??= $this->translator
->cssToXPath($cssExpr, $prefix);
}