| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of Twig. |
| 5 |
* |
| 6 |
* (c) Fabien Potencier |
| 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 ElementorDeps\Twig\Extension; |
| 12 |
|
| 13 |
use ElementorDeps\Twig\ExpressionParser; |
| 14 |
use ElementorDeps\Twig\Node\Expression\AbstractExpression; |
| 15 |
use ElementorDeps\Twig\NodeVisitor\NodeVisitorInterface; |
| 16 |
use ElementorDeps\Twig\TokenParser\TokenParserInterface; |
| 17 |
use ElementorDeps\Twig\TwigFilter; |
| 18 |
use ElementorDeps\Twig\TwigFunction; |
| 19 |
use ElementorDeps\Twig\TwigTest; |
| 20 |
/** |
| 21 |
* Interface implemented by extension classes. |
| 22 |
* |
| 23 |
* @author Fabien Potencier <fabien@symfony.com> |
| 24 |
*/ |
| 25 |
interface ExtensionInterface |
| 26 |
{ |
| 27 |
/** |
| 28 |
* Returns the token parser instances to add to the existing list. |
| 29 |
* |
| 30 |
* @return TokenParserInterface[] |
| 31 |
*/ |
| 32 |
public function getTokenParsers(); |
| 33 |
/** |
| 34 |
* Returns the node visitor instances to add to the existing list. |
| 35 |
* |
| 36 |
* @return NodeVisitorInterface[] |
| 37 |
*/ |
| 38 |
public function getNodeVisitors(); |
| 39 |
/** |
| 40 |
* Returns a list of filters to add to the existing list. |
| 41 |
* |
| 42 |
* @return TwigFilter[] |
| 43 |
*/ |
| 44 |
public function getFilters(); |
| 45 |
/** |
| 46 |
* Returns a list of tests to add to the existing list. |
| 47 |
* |
| 48 |
* @return TwigTest[] |
| 49 |
*/ |
| 50 |
public function getTests(); |
| 51 |
/** |
| 52 |
* Returns a list of functions to add to the existing list. |
| 53 |
* |
| 54 |
* @return TwigFunction[] |
| 55 |
*/ |
| 56 |
public function getFunctions(); |
| 57 |
/** |
| 58 |
* Returns a list of operators to add to the existing list. |
| 59 |
* |
| 60 |
* @return array<array> First array of unary operators, second array of binary operators |
| 61 |
* |
| 62 |
* @psalm-return array{ |
| 63 |
* array<string, array{precedence: int, class: class-string<AbstractExpression>}>, |
| 64 |
* array<string, array{precedence: int, class?: class-string<AbstractExpression>, associativity: ExpressionParser::OPERATOR_*}> |
| 65 |
* } |
| 66 |
*/ |
| 67 |
public function getOperators(); |
| 68 |
} |
| 69 |
|