class renderer implements renderer_interface

s9e\TextFormatter\Renderer adapter

Properties

protected Helper $censor
protected dispatcher_interface $dispatcher
protected mention_helper $mention_helper
protected quote_helper $quote_helper
protected Renderer $renderer
protected bool $viewcensors
protected bool $viewimg
protected bool $viewsmilies
protected bool $usemention

Methods

__construct(driver_interface $cache, string $cache_dir, string $key, factory $factory, dispatcher_interface $dispatcher)

Constructor

configure_mention_helper(mention_helper $mention_helper)

Configure the mention_helper object used to display extended information in mentions

configure_quote_helper(quote_helper $quote_helper)

Configure the quote_helper object used to display extended information in quotes

null
configure_smilies_path(config $config, path_helper $path_helper)

Automatically set the smilies path based on config

null
configure_user(user $user, config $config, auth $auth)

Configure this renderer as per the user's settings

Renderer
get_renderer()

Return the instance of s9e\TextFormatter\Renderer used by this object

bool
get_viewcensors()

Return the value of the "viewcensors" option

bool
get_viewimg()

Return the value of the "viewimg" option

bool
get_viewsmilies()

Return the value of the "viewsmilies" option

string
render($xml)

Render given text

null
set_smilies_path($path)

Set the smilies' path

null
set_viewcensors(bool $value)

Set the "viewcensors" option

null
set_viewimg(bool $value)

Set the "viewimg" option

null
set_viewsmilies(bool $value)

Set the "viewsmilies" option

null
set_usemention(bool $value)

Set the "usemention" option

Details

at line 75
__construct(driver_interface $cache, string $cache_dir, string $key, factory $factory, dispatcher_interface $dispatcher)

Constructor

Parameters

driver_interface $cache
string $cache_dir

Path to the cache dir

string $key

Cache key

factory $factory
dispatcher_interface $dispatcher

at line 130
configure_mention_helper(mention_helper $mention_helper)

Configure the mention_helper object used to display extended information in mentions

Parameters

mention_helper $mention_helper

at line 140
configure_quote_helper(quote_helper $quote_helper)

Configure the quote_helper object used to display extended information in quotes

Parameters

quote_helper $quote_helper

at line 152
null configure_smilies_path(config $config, path_helper $path_helper)

Automatically set the smilies path based on config

Parameters

config $config
path_helper $path_helper

Return Value

null

at line 172
null configure_user(user $user, config $config, auth $auth)

Configure this renderer as per the user's settings

Should set the locale as well as the viewcensor/viewimg/viewsmilies options.

Parameters

user $user
config $config
auth $auth

Return Value

null

at line 205
Renderer get_renderer()

Return the instance of s9e\TextFormatter\Renderer used by this object

Return Value

Renderer

at line 213
bool get_viewcensors()

Return the value of the "viewcensors" option

Return Value

bool

Option's value

at line 221
bool get_viewimg()

Return the value of the "viewimg" option

Return Value

bool

Option's value

at line 229
bool get_viewsmilies()

Return the value of the "viewsmilies" option

Return Value

bool

Option's value

at line 237
string render($xml)

Render given text

Parameters

$xml

Return Value

string

at line 285
null set_smilies_path($path)

Set the smilies' path

Parameters

$path

Return Value

null

at line 293
null set_viewcensors(bool $value)

Set the "viewcensors" option

Parameters

bool $value

Option's value

Return Value

null

at line 302
null set_viewimg(bool $value)

Set the "viewimg" option

Parameters

bool $value

Option's value

Return Value

null

at line 311
null set_viewsmilies(bool $value)

Set the "viewsmilies" option

Parameters

bool $value

Option's value

Return Value

null

at line 320
null set_usemention(bool $value)

Set the "usemention" option

Parameters

bool $value

Option's value

Return Value

null