| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
declare(strict_types=1);
|
|
|
4 |
|
|
|
5 |
/*
|
|
|
6 |
* This file is part of the league/commonmark package.
|
|
|
7 |
*
|
|
|
8 |
* (c) Colin O'Dell <colinodell@gmail.com>
|
|
|
9 |
*
|
|
|
10 |
* Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
|
|
|
11 |
* - (c) John MacFarlane
|
|
|
12 |
*
|
|
|
13 |
* Additional emphasis processing code based on commonmark-java (https://github.com/atlassian/commonmark-java)
|
|
|
14 |
* - (c) Atlassian Pty Ltd
|
|
|
15 |
*
|
|
|
16 |
* For the full copyright and license information, please view the LICENSE
|
|
|
17 |
* file that was distributed with this source code.
|
|
|
18 |
*/
|
|
|
19 |
|
|
|
20 |
namespace League\CommonMark\Delimiter\Processor;
|
|
|
21 |
|
| 991 |
lars |
22 |
use League\CommonMark\Exception\InvalidArgumentException;
|
|
|
23 |
|
| 148 |
lars |
24 |
interface DelimiterProcessorCollectionInterface extends \Countable
|
|
|
25 |
{
|
|
|
26 |
/**
|
|
|
27 |
* Add the given delim processor to the collection
|
|
|
28 |
*
|
|
|
29 |
* @param DelimiterProcessorInterface $processor The delim processor to add
|
|
|
30 |
*
|
| 991 |
lars |
31 |
* @throws InvalidArgumentException Exception will be thrown if attempting to add multiple processors for the same character
|
| 148 |
lars |
32 |
*/
|
|
|
33 |
public function add(DelimiterProcessorInterface $processor): void;
|
|
|
34 |
|
|
|
35 |
/**
|
|
|
36 |
* Returns the delim processor which handles the given character if one exists
|
|
|
37 |
*/
|
|
|
38 |
public function getDelimiterProcessor(string $char): ?DelimiterProcessorInterface;
|
|
|
39 |
|
|
|
40 |
/**
|
|
|
41 |
* Returns an array of delimiter characters who have associated processors
|
|
|
42 |
*
|
|
|
43 |
* @return string[]
|
|
|
44 |
*/
|
|
|
45 |
public function getDelimiterCharacters(): array;
|
|
|
46 |
}
|