Copied!

An implementation of DelimiterProcessorInterface that dispatches all calls to two or more other DelimiterProcessors depending on the length of the delimiter run. All child DelimiterProcessors must have different minimum lengths. A given delimiter run is dispatched to the child with the largest acceptable minimum length. If no child is applicable, the one with the largest minimum length is chosen.

  • internal
CloneableFinalInstantiable
Methods
public __construct(string $char, League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface $processor)
public add(League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface $processor) : void
 

Adds the given processor to this staggered delimiter processor

  • throws \InvalidArgumentException if attempting to add another processors for the same character and minimum length
public getClosingCharacter() : string
public getDelimiterUse(League\CommonMark\Delimiter\DelimiterInterface $opener, League\CommonMark\Delimiter\DelimiterInterface $closer) : int
public getMinLength() : int
public getOpeningCharacter() : string
public process(League\CommonMark\Node\Inline\AbstractStringContainer $opener, League\CommonMark\Node\Inline\AbstractStringContainer $closer, int $delimiterUse) : void
Properties
private string $delimiterChar
 
  • psalm-readonly
private int $minLength = 0
 
  • psalm-readonly-allow-private-mutation
private array $processors = []
 
  • var array<int,\DelimiterProcessorInterface>|\DelimiterProcessorInterface[]
  • psalm-readonly-allow-private-mutation
Methods
private findProcessor(int $len) : League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration