| 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 |
|
| 12 |
namespace Symfony\Component\CssSelector\XPath\Extension; |
| 13 |
|
| 14 |
use Symfony\Component\CssSelector\XPath\XPathExpr; |
| 15 |
|
| 16 |
/** |
| 17 |
* XPath expression translator extension interface. |
| 18 |
* |
| 19 |
* This component is a port of the Python cssselect library, |
| 20 |
* which is copyright Ian Bicking, @see https://github.com/scrapy/cssselect. |
| 21 |
* |
| 22 |
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> |
| 23 |
* |
| 24 |
* @internal |
| 25 |
*/ |
| 26 |
interface ExtensionInterface |
| 27 |
{ |
| 28 |
/** |
| 29 |
* Returns node translators. |
| 30 |
* |
| 31 |
* These callables will receive the node as first argument and the translator as second argument. |
| 32 |
* |
| 33 |
* @return callable[] |
| 34 |
*/ |
| 35 |
public function getNodeTranslators(): array; |
| 36 |
|
| 37 |
/** |
| 38 |
* Returns combination translators. |
| 39 |
* |
| 40 |
* @return callable[] |
| 41 |
*/ |
| 42 |
public function getCombinationTranslators(): array; |
| 43 |
|
| 44 |
/** |
| 45 |
* Returns function translators. |
| 46 |
* |
| 47 |
* @return callable[] |
| 48 |
*/ |
| 49 |
public function getFunctionTranslators(): array; |
| 50 |
|
| 51 |
/** |
| 52 |
* Returns pseudo-class translators. |
| 53 |
* |
| 54 |
* @return callable[] |
| 55 |
*/ |
| 56 |
public function getPseudoClassTranslators(): array; |
| 57 |
|
| 58 |
/** |
| 59 |
* Returns attribute operation translators. |
| 60 |
* |
| 61 |
* @return callable[] |
| 62 |
*/ |
| 63 |
public function getAttributeMatchingTranslators(): array; |
| 64 |
|
| 65 |
/** |
| 66 |
* Returns combination translators found inside ":has()" relation. |
| 67 |
* |
| 68 |
* @return array<string, callable(XPathExpr, XPathExpr): XPathExpr> |
| 69 |
*/ |
| 70 |
public function getRelativeCombinationTranslators(): array; |
| 71 |
|
| 72 |
/** |
| 73 |
* Returns extension name. |
| 74 |
*/ |
| 75 |
public function getName(): string; |
| 76 |
} |
| 77 |
|