class Formatter

Properties

protected Repository $cache
protected Dispatcher $events
protected string $cacheDir

Methods

__construct(Repository $cache, Dispatcher $events, string $cacheDir)

No description

string
parse(string $text, mixed $context = null)

Parse text.

string
render(string $xml, mixed $context = null)

Render parsed XML.

string
unparse(string $xml)

Unparse XML.

flush()

Flush the cache so that the formatter components are regenerated.

Configurator
getConfigurator()

No description

configureExternalLinks(Configurator $configurator)

No description

mixed
getComponent(string $name)

Get a TextFormatter component.

Parser
getParser(mixed $context = null)

Get the parser.

Renderer
getRenderer()

Get the renderer.

string
getJs()

Get the formatter JavaScript.

Details

__construct(Repository $cache, Dispatcher $events, string $cacheDir)

Parameters

Repository $cache
Dispatcher $events
string $cacheDir

string parse(string $text, mixed $context = null)

Parse text.

Parameters

string $text
mixed $context

Return Value

string

string render(string $xml, mixed $context = null)

Render parsed XML.

Parameters

string $xml
mixed $context

Return Value

string

string unparse(string $xml)

Unparse XML.

Parameters

string $xml

Return Value

string

flush()

Flush the cache so that the formatter components are regenerated.

protected Configurator getConfigurator()

Return Value

Configurator

Parameters

Configurator $configurator

protected mixed getComponent(string $name)

Get a TextFormatter component.

Parameters

string $name "renderer" or "parser" or "js"

Return Value

mixed

protected Parser getParser(mixed $context = null)

Get the parser.

Parameters

mixed $context

Return Value

Parser

protected Renderer getRenderer()

Get the renderer.

Return Value

Renderer

string getJs()

Get the formatter JavaScript.

Return Value

string