EnvironmentInterface::getConfig()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
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>
0 ignored issues
show
Documentation introduced by Colin O'Dell
The doc-type iterable<BlockParserInterface> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

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.

Loading history...
37
     */
38
    public function getBlockParsers(): iterable;
39
40
    /**
41
     * @param string $character
42
     *
43
     * @return iterable<InlineParserInterface>
0 ignored issues
show
Documentation introduced by Colin O'Dell
The doc-type iterable<InlineParserInterface> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

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.

Loading history...
44
     */
45
    public function getInlineParsersForCharacter(string $character): iterable;
46
47
    /**
48
     * @return DelimiterProcessorCollection
49
     */
50
    public function getDelimiterProcessors(): DelimiterProcessorCollection;
51
52
    /**
53
     * @param string $blockClass
54
     *
55
     * @return iterable<BlockRendererInterface>
0 ignored issues
show
Documentation introduced by Colin O'Dell
The doc-type iterable<BlockRendererInterface> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

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.

Loading history...
56
     */
57
    public function getBlockRenderersForClass(string $blockClass): iterable;
58
59
    /**
60
     * @param string $inlineClass
61
     *
62
     * @return iterable<InlineRendererInterface>
0 ignored issues
show
Documentation introduced by Colin O'Dell
The doc-type iterable<InlineRendererInterface> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

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.

Loading history...
63
     */
64
    public function getInlineRenderersForClass(string $inlineClass): iterable;
65
66
    /**
67
     * Regex which matches any character which doesn't indicate an inline element
68
     *
69
     * This allows us to parse multiple non-special characters at once
70
     *
71
     * @return string
72
     */
73
    public function getInlineParserCharacterRegex(): string;
74
75
    /**
76
     * Dispatches the given event to listeners
77
     *
78
     * @param AbstractEvent $event
79
     *
80
     * @return void
81
     */
82
    public function dispatch(AbstractEvent $event): void;
83
}
84