class renderer implements renderer_interface

s9e\TextFormatter\Renderer adapter

Properties

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

Methods

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

Constructor

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

void
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_viewflash()

Return the value of the "viewflash" 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_viewflash(bool $value)

Set the "viewflash" option

null
set_viewimg(bool $value)

Set the "viewimg" option

null
set_viewsmilies(bool $value)

Set the "viewsmilies" option

Details

at line 70
__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 125
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 137
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 157
void 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/viewflash/viewimg/viewsmilies options.

Parameters

user $user
config $config
auth $auth

Return Value

void

at line 190
Renderer get_renderer()

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

Return Value

Renderer

at line 198
bool get_viewcensors()

Return the value of the "viewcensors" option

Return Value

bool

Option's value

at line 206
bool get_viewflash()

Return the value of the "viewflash" option

Return Value

bool

Option's value

at line 214
bool get_viewimg()

Return the value of the "viewimg" option

Return Value

bool

Option's value

at line 222
bool get_viewsmilies()

Return the value of the "viewsmilies" option

Return Value

bool

Option's value

at line 230
string render($xml)

Render given text

Parameters

$xml

Return Value

string

at line 273
null set_smilies_path($path)

Set the smilies' path

Parameters

$path

Return Value

null

at line 281
null set_viewcensors(bool $value)

Set the "viewcensors" option

Parameters

bool $value

Option's value

Return Value

null

at line 290
null set_viewflash(bool $value)

Set the "viewflash" option

Parameters

bool $value

Option's value

Return Value

null

at line 299
null set_viewimg(bool $value)

Set the "viewimg" option

Parameters

bool $value

Option's value

Return Value

null

at line 308
null set_viewsmilies(bool $value)

Set the "viewsmilies" option

Parameters

bool $value

Option's value

Return Value

null