HumHub Documentation (unofficial)

CssSelectorConverter
in package

CssSelectorConverter is the main entry point of the component and can convert CSS selectors to XPath expressions.

Tags
author

Christophe Coevoet stof@notk.org

Table of Contents

Properties

$cache  : mixed
$htmlCache  : mixed
$translator  : mixed
$xmlCache  : mixed

Methods

__construct()  : mixed
toXPath()  : string
Translates a CSS expression to its XPath equivalent.

Properties

Methods

__construct()

public __construct([bool $html = true ]) : mixed
Parameters
$html : bool = true

Whether HTML support should be enabled. Disable it for XML documents

toXPath()

Translates a CSS expression to its XPath equivalent.

public toXPath(string $cssExpr[, string $prefix = 'descendant-or-self::' ]) : string

Optionally, a prefix can be added to the resulting XPath expression with the $prefix parameter.

Parameters
$cssExpr : string
$prefix : string = 'descendant-or-self::'
Return values
string

        
On this page

Search results