Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\CssSelector\XPath; Chris@0: Chris@0: use Symfony\Component\CssSelector\Node\SelectorNode; Chris@0: Chris@0: /** Chris@0: * XPath expression translator interface. Chris@0: * Chris@0: * This component is a port of the Python cssselect library, Chris@0: * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. Chris@0: * Chris@0: * @author Jean-François Simon Chris@0: * Chris@0: * @internal Chris@0: */ Chris@0: interface TranslatorInterface Chris@0: { Chris@0: /** Chris@0: * Translates a CSS selector to an XPath expression. Chris@0: * Chris@0: * @param string $cssExpr Chris@0: * @param string $prefix Chris@0: * Chris@0: * @return string Chris@0: */ Chris@0: public function cssToXPath($cssExpr, $prefix = 'descendant-or-self::'); Chris@0: Chris@0: /** Chris@0: * Translates a parsed selector node to an XPath expression. Chris@0: * Chris@0: * @param SelectorNode $selector Chris@0: * @param string $prefix Chris@0: * Chris@0: * @return string Chris@0: */ Chris@0: public function selectorToXPath(SelectorNode $selector, $prefix = 'descendant-or-self::'); Chris@0: }