These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the league/commonmark package. |
||
5 | * |
||
6 | * (c) Colin O'Dell <[email protected]> |
||
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 League\CommonMark; |
||
13 | |||
14 | use League\CommonMark\Block\Parser\BlockParserInterface; |
||
15 | use League\CommonMark\Block\Renderer\BlockRendererInterface; |
||
16 | use League\CommonMark\Delimiter\Processor\DelimiterProcessorCollection; |
||
17 | use League\CommonMark\Event\AbstractEvent; |
||
18 | use League\CommonMark\Inline\Parser\InlineParserInterface; |
||
19 | use League\CommonMark\Inline\Renderer\InlineRendererInterface; |
||
20 | |||
21 | interface EnvironmentInterface |
||
22 | { |
||
23 | const HTML_INPUT_STRIP = 'strip'; |
||
24 | const HTML_INPUT_ALLOW = 'allow'; |
||
25 | const HTML_INPUT_ESCAPE = 'escape'; |
||
26 | |||
27 | /** |
||
28 | * @param string|null $key |
||
29 | * @param mixed $default |
||
30 | * |
||
31 | * @return mixed |
||
32 | */ |
||
33 | public function getConfig($key = null, $default = null); |
||
34 | |||
35 | /** |
||
36 | * @return iterable<BlockParserInterface> |
||
37 | */ |
||
38 | public function getBlockParsers(): iterable; |
||
39 | |||
40 | /** |
||
41 | * @param string $character |
||
42 | * |
||
43 | * @return iterable<InlineParserInterface> |
||
44 | */ |
||
45 | public function getInlineParsersForCharacter(string $character): iterable; |
||
46 | |||
47 | /** |
||
48 | * @return DelimiterProcessorCollection |
||
49 | */ |
||
50 | public function getDelimiterProcessors(): DelimiterProcessorCollection; |
||
51 | |||
52 | /** |
||
53 | * @return iterable<DocumentProcessorInterface> |
||
0 ignored issues
–
show
|
|||
54 | */ |
||
55 | public function getDocumentProcessors(): iterable; |
||
56 | |||
57 | /** |
||
58 | * @param string $blockClass |
||
59 | * |
||
60 | * @return iterable<BlockRendererInterface> |
||
61 | */ |
||
62 | public function getBlockRenderersForClass(string $blockClass): iterable; |
||
63 | |||
64 | /** |
||
65 | * @param string $inlineClass |
||
66 | * |
||
67 | * @return iterable<InlineRendererInterface> |
||
68 | */ |
||
69 | public function getInlineRenderersForClass(string $inlineClass): iterable; |
||
70 | |||
71 | /** |
||
72 | * Regex which matches any character which doesn't indicate an inline element |
||
73 | * |
||
74 | * This allows us to parse multiple non-special characters at once |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getInlineParserCharacterRegex(): string; |
||
79 | |||
80 | /** |
||
81 | * Dispatches the given event to listeners |
||
82 | * |
||
83 | * @param AbstractEvent $event |
||
84 | */ |
||
85 | public function dispatch(AbstractEvent $event): void; |
||
86 | } |
||
87 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.