CssSelectorConverter is the main entry point of the component and can convert CSS
selectors to XPath expressions.
- author Christophe Coevoet
Cloneable
Instantiable
Methods |
public
__construct
(
bool
$html
=
true
)
|
public
toXPath
(
string
$cssExpr
,
string
$prefix
=
'descendant-or-self::'
) :
string
Translates a CSS expression to its XPath equivalent. Optionally, a prefix can be added to the resulting XPath |
Properties |
private array $cache |
private static array $htmlCache = [ 'descendant-or-self::' => [ '.language-PHP' => 'descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' language-PHP ')]' ] ] |
private $translator |
private static array $xmlCache |
Properties |
private static array $htmlCache = [ 'descendant-or-self::' => [ '.language-PHP' => 'descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' language-PHP ')]' ] ] |
private static array $xmlCache |