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