ConfigurableEnvironmentInterface
extends
EnvironmentInterface
in
Interface for an Environment which can be configured with config settings, parsers, processors, and renderers
Table of Contents
- HTML_INPUT_ALLOW = 'allow'
- HTML_INPUT_ESCAPE = 'escape'
- HTML_INPUT_STRIP = 'strip'
- addBlockParser() : self
- Registers the given block parser with the Environment
- addBlockRenderer() : self
- addDelimiterProcessor() : ConfigurableEnvironmentInterface
- Registers the given delimiter processor with the Environment
- addEventListener() : self
- Registers the given event listener
- addExtension() : ConfigurableEnvironmentInterface
- Registers the given extension with the Environment
- addInlineParser() : self
- Registers the given inline parser with the Environment
- addInlineRenderer() : self
- Registers the given inline renderer with the Environment
- dispatch() : void
- Dispatches the given event to listeners
- getBlockParsers() : iteratable<string|int, BlockParserInterface>
- getBlockRenderersForClass() : iteratable<string|int, BlockRendererInterface>
- getConfig() : mixed
- getDelimiterProcessors() : DelimiterProcessorCollection
- getInlineParserCharacterRegex() : string
- Regex which matches any character which doesn't indicate an inline element
- getInlineParsersForCharacter() : iteratable<string|int, InlineParserInterface>
- getInlineRenderersForClass() : iteratable<string|int, InlineRendererInterface>
- mergeConfig() : void
- setConfig() : void
Constants
HTML_INPUT_ALLOW
public
mixed
HTML_INPUT_ALLOW
= 'allow'
HTML_INPUT_ESCAPE
public
mixed
HTML_INPUT_ESCAPE
= 'escape'
HTML_INPUT_STRIP
public
mixed
HTML_INPUT_STRIP
= 'strip'
Methods
addBlockParser()
Registers the given block parser with the Environment
public
addBlockParser(BlockParserInterface $parser, int $priority) : self
Parameters
- $parser : BlockParserInterface
-
Block parser instance
- $priority : int
-
Priority (a higher number will be executed earlier)
Return values
self —addBlockRenderer()
public
addBlockRenderer(string $blockClass, BlockRendererInterface $blockRenderer, int $priority) : self
Parameters
- $blockClass : string
-
The fully-qualified block element class name the renderer below should handle
- $blockRenderer : BlockRendererInterface
-
The renderer responsible for rendering the type of element given above
- $priority : int
-
Priority (a higher number will be executed earlier)
Return values
self —addDelimiterProcessor()
Registers the given delimiter processor with the Environment
public
addDelimiterProcessor(DelimiterProcessorInterface $processor) : ConfigurableEnvironmentInterface
Parameters
- $processor : DelimiterProcessorInterface
-
Delimiter processors instance
Return values
ConfigurableEnvironmentInterface —addEventListener()
Registers the given event listener
public
addEventListener(string $eventClass, callable $listener, int $priority) : self
Parameters
- $eventClass : string
-
Fully-qualified class name of the event this listener should respond to
- $listener : callable
-
Listener to be executed
- $priority : int
-
Priority (a higher number will be executed earlier)
Return values
self —addExtension()
Registers the given extension with the Environment
public
addExtension(ExtensionInterface $extension) : ConfigurableEnvironmentInterface
Parameters
- $extension : ExtensionInterface
Return values
ConfigurableEnvironmentInterface —addInlineParser()
Registers the given inline parser with the Environment
public
addInlineParser(InlineParserInterface $parser, int $priority) : self
Parameters
- $parser : InlineParserInterface
-
Inline parser instance
- $priority : int
-
Priority (a higher number will be executed earlier)
Return values
self —addInlineRenderer()
Registers the given inline renderer with the Environment
public
addInlineRenderer(string $inlineClass, InlineRendererInterface $renderer, int $priority) : self
Parameters
- $inlineClass : string
-
The fully-qualified inline element class name the renderer below should handle
- $renderer : InlineRendererInterface
-
The renderer responsible for rendering the type of element given above
- $priority : int
-
Priority (a higher number will be executed earlier)
Return values
self —dispatch()
Dispatches the given event to listeners
public
dispatch(AbstractEvent $event) : void
Parameters
- $event : AbstractEvent
Return values
void —getBlockParsers()
public
getBlockParsers() : iteratable<string|int, BlockParserInterface>
Return values
iteratable<string|int, BlockParserInterface> —getBlockRenderersForClass()
public
getBlockRenderersForClass(string $blockClass) : iteratable<string|int, BlockRendererInterface>
Parameters
- $blockClass : string
Return values
iteratable<string|int, BlockRendererInterface> —getConfig()
public
getConfig([string|null $key = null ][, mixed $default = null ]) : mixed
Parameters
- $key : string|null = null
- $default : mixed = null
Return values
mixed —getDelimiterProcessors()
public
getDelimiterProcessors() : DelimiterProcessorCollection
Return values
DelimiterProcessorCollection —getInlineParserCharacterRegex()
Regex which matches any character which doesn't indicate an inline element
public
getInlineParserCharacterRegex() : string
This allows us to parse multiple non-special characters at once
Return values
string —getInlineParsersForCharacter()
public
getInlineParsersForCharacter(string $character) : iteratable<string|int, InlineParserInterface>
Parameters
- $character : string
Return values
iteratable<string|int, InlineParserInterface> —getInlineRenderersForClass()
public
getInlineRenderersForClass(string $inlineClass) : iteratable<string|int, InlineRendererInterface>
Parameters
- $inlineClass : string
Return values
iteratable<string|int, InlineRendererInterface> —mergeConfig()
public
mergeConfig([array<string, mixed> $config = [] ]) : void
Parameters
- $config : array<string, mixed> = []
Return values
void —setConfig()
public
setConfig([array<string, mixed> $config = [] ]) : void
Parameters
- $config : array<string, mixed> = []