CssSelectorConverter is the main entry point of the component and can convert CSS selectors to XPath expressions.
- author Christophe Coevoet
CloneableInstantiable
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 expression with the $prefix parameter. |
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 Symfony |
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 = [] |