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)

<p>Parse text.</p>

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

<p>Render parsed XML.</p>

string
unparse(string $xml)

<p>Unparse XML.</p>

flush()

<p>Flush the cache so that the formatter components are regenerated.</p>

Configurator
getConfigurator()

No description

configureExternalLinks(Configurator $configurator)

No description

mixed
getComponent(string $name)

<p>Get a TextFormatter component.</p>

Parser
getParser(mixed $context = null)

<p>Get the parser.</p>

Renderer
getRenderer()

<p>Get the renderer.</p>

string
getJs()

<p>Get the formatter JavaScript.</p>

Details

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

Parameters

Repository $cache
Dispatcher $events
string $cacheDir

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

<p>Parse text.</p>

Parameters

string $text
mixed $context

Return Value

string

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

<p>Render parsed XML.</p>

Parameters

string $xml
mixed $context
ServerRequestInterface $request

Return Value

string

string unparse(string $xml)

<p>Unparse XML.</p>

Parameters

string $xml

Return Value

string

flush()

<p>Flush the cache so that the formatter components are regenerated.</p>

protected Configurator getConfigurator()

Return Value

Configurator

Parameters

Configurator $configurator

protected mixed getComponent(string $name)

<p>Get a TextFormatter component.</p>

Parameters

string $name <p>&quot;renderer&quot; or &quot;parser&quot; or &quot;js&quot;</p>

Return Value

mixed

protected Parser getParser(mixed $context = null)

<p>Get the parser.</p>

Parameters

mixed $context

Return Value

Parser

protected Renderer getRenderer()

<p>Get the renderer.</p>

Return Value

Renderer

string getJs()

<p>Get the formatter JavaScript.</p>

Return Value

string