Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector

CssSelectorConverter::__constructpublicWC 1.0

Method of the class: CssSelectorConverter{}

No Hooks.

Returns

null. Nothing (null).

Usage

$CssSelectorConverter = new CssSelectorConverter();
$CssSelectorConverter->__construct( $html );
$html(true|false)
Whether HTML support should be enabled. Disable it for XML documents.
Default: true

CssSelectorConverter::__construct() code WC 10.8.1

public function __construct(bool $html = true)
{
    $this->translator = new Translator();

    if ($html) {
        $this->translator->registerExtension(new HtmlExtension($this->translator));
        $this->cache = &self::$htmlCache;
    } else {
        $this->cache = &self::$xmlCache;
    }

    $this->translator
        ->registerParserShortcut(new EmptyStringParser())
        ->registerParserShortcut(new ElementParser())
        ->registerParserShortcut(new ClassParser())
        ->registerParserShortcut(new HashParser())
    ;
}