Copied!
CloneableFinalInstantiable
Methods
public __construct(array $config = [])
 
  • param array<string,mixed> $config
public addBlockStartParser(League\CommonMark\Parser\Block\BlockStartParserInterface $parser, int $priority = 0) : League\CommonMark\Environment\EnvironmentBuilderInterface
public addDelimiterProcessor(League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface $processor) : League\CommonMark\Environment\EnvironmentBuilderInterface
public addEventListener(string $eventClass, callable $listener, int $priority = 0) : League\CommonMark\Environment\EnvironmentBuilderInterface
public addExtension(League\CommonMark\Extension\ExtensionInterface $extension) : League\CommonMark\Environment\EnvironmentBuilderInterface
 

Add a single extension

  • return $this
public addInlineParser(League\CommonMark\Parser\Inline\InlineParserInterface $parser, int $priority = 0) : League\CommonMark\Environment\EnvironmentBuilderInterface
public addRenderer(string $nodeClass, League\CommonMark\Renderer\NodeRendererInterface $renderer, int $priority = 0) : League\CommonMark\Environment\EnvironmentBuilderInterface
public static createCommonMarkEnvironment(array $config = []) : League\CommonMark\Environment\Environment
 
  • deprecated Instantiate the environment and add the extension yourself
  • param array<string,mixed> $config
public static createDefaultConfiguration() : League\Config\Configuration
public static createGFMEnvironment(array $config = []) : League\CommonMark\Environment\Environment
 
  • deprecated Instantiate the environment and add the extension yourself
  • param array<string,mixed> $config
public dispatch(object $event) : object
public getBlockStartParsers() : iterable
 
    public getConfiguration() : League\Config\ConfigurationInterface
    public getDelimiterProcessors() : League\CommonMark\Delimiter\Processor\DelimiterProcessorCollection
    public getExtensions() : iterable
     
      public getInlineParsers() : iterable
       
      • return iterable<\InlineParserInterface>
      public getListenersForEvent(object $event) : iterable
       
      • return iterable<callable>
      public getRenderersForClass(string $nodeClass) : iterable
       
        public getSlugNormalizer() : League\CommonMark\Normalizer\TextNormalizerInterface
        public mergeConfig(array $config) : void
         
        • deprecated Environment::mergeConfig() is deprecated since league/commonmark v2.0 and will be removed in v3.0. Configuration should be set when instantiating the environment instead.
        • param array<string,mixed> $config
        public setEventDispatcher(Psr\EventDispatcher\EventDispatcherInterface $dispatcher) : void
        Properties
        private League\CommonMark\Util\PrioritizedList $blockStartParsers
         
        • var \PrioritizedList<\BlockStartParserInterface>
        • psalm-readonly
        private League\Config\Configuration $config
         
        • psalm-readonly
        private League\CommonMark\Delimiter\Processor\DelimiterProcessorCollection $delimiterProcessors
         
        • psalm-readonly
        private ?Psr\EventDispatcher\EventDispatcherInterface $eventDispatcher = NULL
        private array $extensions = []
         
        • var \ExtensionInterface[]
        • psalm-readonly-allow-private-mutation
        private bool $extensionsInitialized = false
         
        • psalm-readonly-allow-private-mutation
        private League\CommonMark\Util\PrioritizedList $inlineParsers
         
        • var \PrioritizedList<\InlineParserInterface>
        • psalm-readonly
        private League\CommonMark\Util\PrioritizedList $listenerData
         
        • var \PrioritizedList<\ListenerData>
        • psalm-readonly-allow-private-mutation
        private array $renderersByClass = []
         
        • var array<string,\PrioritizedList<\NodeRendererInterface>>
        • psalm-readonly-allow-private-mutation
        private ?League\CommonMark\Normalizer\TextNormalizerInterface $slugNormalizer = NULL
        private array $uninitializedExtensions = []
         
        • var \ExtensionInterface[]
        • psalm-readonly-allow-private-mutation
        Methods
        private assertUninitialized(string $message) : void
         
        • throws \AlreadyInitializedException
        private initializeExtensions() : void
        private injectEnvironmentAndConfigurationIfNeeded(object $object) : void
        Methods
        public static createCommonMarkEnvironment(array $config = []) : League\CommonMark\Environment\Environment
         
        • deprecated Instantiate the environment and add the extension yourself
        • param array<string,mixed> $config
        public static createDefaultConfiguration() : League\Config\Configuration
        public static createGFMEnvironment(array $config = []) : League\CommonMark\Environment\Environment
         
        • deprecated Instantiate the environment and add the extension yourself
        • param array<string,mixed> $config
        © 2024 Bruce Wells
        Search Namespaces \ Classes
        Configuration