| Zeile 12... |
Zeile 12... |
| 12 |
*/
|
12 |
*/
|
| Zeile 13... |
Zeile 13... |
| 13 |
|
13 |
|
| Zeile 14... |
Zeile 14... |
| 14 |
namespace League\CommonMark\Environment;
|
14 |
namespace League\CommonMark\Environment;
|
| - |
|
15 |
|
| 15 |
|
16 |
use League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface;
|
| 16 |
use League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface;
|
17 |
use League\CommonMark\Exception\AlreadyInitializedException;
|
| 17 |
use League\CommonMark\Extension\ExtensionInterface;
|
18 |
use League\CommonMark\Extension\ExtensionInterface;
|
| 18 |
use League\CommonMark\Node\Node;
|
19 |
use League\CommonMark\Node\Node;
|
| 19 |
use League\CommonMark\Parser\Block\BlockStartParserInterface;
|
20 |
use League\CommonMark\Parser\Block\BlockStartParserInterface;
|
| Zeile 26... |
Zeile 27... |
| 26 |
*/
|
27 |
*/
|
| 27 |
interface EnvironmentBuilderInterface extends ConfigurationProviderInterface
|
28 |
interface EnvironmentBuilderInterface extends ConfigurationProviderInterface
|
| 28 |
{
|
29 |
{
|
| 29 |
/**
|
30 |
/**
|
| 30 |
* Registers the given extension with the Environment
|
31 |
* Registers the given extension with the Environment
|
| - |
|
32 |
*
|
| - |
|
33 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| 31 |
*/
|
34 |
*/
|
| 32 |
public function addExtension(ExtensionInterface $extension): EnvironmentBuilderInterface;
|
35 |
public function addExtension(ExtensionInterface $extension): EnvironmentBuilderInterface;
|
| Zeile 33... |
Zeile 36... |
| 33 |
|
36 |
|
| 34 |
/**
|
37 |
/**
|
| 35 |
* Registers the given block start parser with the Environment
|
38 |
* Registers the given block start parser with the Environment
|
| 36 |
*
|
39 |
*
|
| 37 |
* @param BlockStartParserInterface $parser Block parser instance
|
40 |
* @param BlockStartParserInterface $parser Block parser instance
|
| 38 |
* @param int $priority Priority (a higher number will be executed earlier)
|
41 |
* @param int $priority Priority (a higher number will be executed earlier)
|
| 39 |
*
|
42 |
*
|
| - |
|
43 |
* @return $this
|
| - |
|
44 |
*
|
| 40 |
* @return $this
|
45 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| 41 |
*/
|
46 |
*/
|
| Zeile 42... |
Zeile 47... |
| 42 |
public function addBlockStartParser(BlockStartParserInterface $parser, int $priority = 0): EnvironmentBuilderInterface;
|
47 |
public function addBlockStartParser(BlockStartParserInterface $parser, int $priority = 0): EnvironmentBuilderInterface;
|
| 43 |
|
48 |
|
| 44 |
/**
|
49 |
/**
|
| 45 |
* Registers the given inline parser with the Environment
|
50 |
* Registers the given inline parser with the Environment
|
| 46 |
*
|
51 |
*
|
| 47 |
* @param InlineParserInterface $parser Inline parser instance
|
52 |
* @param InlineParserInterface $parser Inline parser instance
|
| 48 |
* @param int $priority Priority (a higher number will be executed earlier)
|
53 |
* @param int $priority Priority (a higher number will be executed earlier)
|
| - |
|
54 |
*
|
| - |
|
55 |
* @return $this
|
| 49 |
*
|
56 |
*
|
| 50 |
* @return $this
|
57 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| Zeile 51... |
Zeile 58... |
| 51 |
*/
|
58 |
*/
|
| 52 |
public function addInlineParser(InlineParserInterface $parser, int $priority = 0): EnvironmentBuilderInterface;
|
59 |
public function addInlineParser(InlineParserInterface $parser, int $priority = 0): EnvironmentBuilderInterface;
|
| 53 |
|
60 |
|
| 54 |
/**
|
61 |
/**
|
| - |
|
62 |
* Registers the given delimiter processor with the Environment
|
| - |
|
63 |
*
|
| 55 |
* Registers the given delimiter processor with the Environment
|
64 |
* @param DelimiterProcessorInterface $processor Delimiter processors instance
|
| 56 |
*
|
65 |
*
|
| Zeile 57... |
Zeile 66... |
| 57 |
* @param DelimiterProcessorInterface $processor Delimiter processors instance
|
66 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| 58 |
*/
|
67 |
*/
|
| Zeile 66... |
Zeile 75... |
| 66 |
* @param int $priority Priority (a higher number will be executed earlier)
|
75 |
* @param int $priority Priority (a higher number will be executed earlier)
|
| 67 |
*
|
76 |
*
|
| 68 |
* @psalm-param class-string<Node> $nodeClass
|
77 |
* @psalm-param class-string<Node> $nodeClass
|
| 69 |
*
|
78 |
*
|
| 70 |
* @return $this
|
79 |
* @return $this
|
| - |
|
80 |
*
|
| - |
|
81 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| 71 |
*/
|
82 |
*/
|
| 72 |
public function addRenderer(string $nodeClass, NodeRendererInterface $renderer, int $priority = 0): EnvironmentBuilderInterface;
|
83 |
public function addRenderer(string $nodeClass, NodeRendererInterface $renderer, int $priority = 0): EnvironmentBuilderInterface;
|
| Zeile 73... |
Zeile 84... |
| 73 |
|
84 |
|
| 74 |
/**
|
85 |
/**
|
| Zeile 77... |
Zeile 88... |
| 77 |
* @param class-string $eventClass Fully-qualified class name of the event this listener should respond to
|
88 |
* @param class-string $eventClass Fully-qualified class name of the event this listener should respond to
|
| 78 |
* @param callable $listener Listener to be executed
|
89 |
* @param callable $listener Listener to be executed
|
| 79 |
* @param int $priority Priority (a higher number will be executed earlier)
|
90 |
* @param int $priority Priority (a higher number will be executed earlier)
|
| 80 |
*
|
91 |
*
|
| 81 |
* @return $this
|
92 |
* @return $this
|
| - |
|
93 |
*
|
| - |
|
94 |
* @throws AlreadyInitializedException if the Environment has already been initialized
|
| 82 |
*/
|
95 |
*/
|
| 83 |
public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;
|
96 |
public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;
|
| 84 |
}
|
97 |
}
|