Extension
2 months ago
Translator.php
2 months ago
TranslatorInterface.php
2 months ago
XPathExpr.php
2 months ago
TranslatorInterface.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace ProfilePressVendor\Symfony\Component\CssSelector\XPath; |
| 12 | |
| 13 | use ProfilePressVendor\Symfony\Component\CssSelector\Node\SelectorNode; |
| 14 | /** |
| 15 | * XPath expression translator interface. |
| 16 | * |
| 17 | * This component is a port of the Python cssselect library, |
| 18 | * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. |
| 19 | * |
| 20 | * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> |
| 21 | * |
| 22 | * @internal |
| 23 | */ |
| 24 | interface TranslatorInterface |
| 25 | { |
| 26 | /** |
| 27 | * Translates a CSS selector to an XPath expression. |
| 28 | */ |
| 29 | public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string; |
| 30 | /** |
| 31 | * Translates a parsed selector node to an XPath expression. |
| 32 | */ |
| 33 | public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string; |
| 34 | } |
| 35 |