WordPress at a glance
class is not described

Symfony\Component\CssSelector\XPath

TranslatorInterface{} WC 1.0

XPath expression translator interface.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.

No Hooks.

Return

null. Nothing.

Usage

$TranslatorInterface = new TranslatorInterface();
// use class methods

Methods

  1. cssToXPath($cssExpr, $prefix = 'descendant-or-self::')
  2. selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::')

Code of TranslatorInterface{} WC 5.3.0

<?php
interface TranslatorInterface
{
    /**
     * Translates a CSS selector to an XPath expression.
     *
     * @param string $cssExpr
     * @param string $prefix
     *
     * @return string
     */
    public function cssToXPath($cssExpr, $prefix = 'descendant-or-self::');

    /**
     * Translates a parsed selector node to an XPath expression.
     *
     * @param SelectorNode $selector
     * @param string       $prefix
     *
     * @return string
     */
    public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::');
}