class service

Class for grabbing/handling cached entries

Constants

private PURGE_DEFERRED_ON_EVENT

Properties

protected driver_interface $driver

Cache driver.

protected config $config

The config.

protected driver_interface $db

Database connection.

protected dispatcher $dispatcher
protected string $phpbb_root_path

Root path.

protected string $php_ext

PHP file extension.

Methods

__construct(driver_interface $driver, config $config, driver_interface $db, dispatcher $dispatcher, string $phpbb_root_path, string $php_ext)

Creates a cache service around a cache driver

get_driver()

Returns the cache driver used by this cache service.

void
deferred_purge()

Deferred purge of the cache.

set_driver(driver_interface $driver)

Replaces the cache driver used by this cache service.

__call($method, $arguments)

No description

obtain_word_list()

Obtain list of naughty words and build preg style replacement arrays for use by the calling script

obtain_icons()

Obtain currently listed icons

obtain_ranks()

Obtain ranks

array
obtain_attach_extensions(mixed $forum_id)

Obtain allowed extensions

obtain_bots()

Obtain active bots

obtain_cfg_items($style)

Obtain cfg file data

obtain_disallowed_usernames()

Obtain disallowed usernames

Details

at line 80
__construct(driver_interface $driver, config $config, driver_interface $db, dispatcher $dispatcher, string $phpbb_root_path, string $php_ext)

Creates a cache service around a cache driver

Parameters

driver_interface $driver

The cache driver

config $config

The config

driver_interface $db

Database connection

dispatcher $dispatcher

Event dispatcher

string $phpbb_root_path

Root path

string $php_ext

PHP file extension

at line 95
driver_interface get_driver()

Returns the cache driver used by this cache service.

Return Value

driver_interface

The cache driver

at line 110
void deferred_purge()

Deferred purge of the cache.

A deferred purge will be executed after rendering a page. It is recommended to be used in cases where an instant purge of the cache is not required, i.e. when the goal of a cache purge is to start from a clear cache at the next page load.

Return Value

void

at line 124
set_driver(driver_interface $driver)

Replaces the cache driver used by this cache service.

Parameters

driver_interface $driver

The cache driver

at line 129
__call($method, $arguments)

No description

Parameters

$method
$arguments

at line 138
obtain_word_list()

Obtain list of naughty words and build preg style replacement arrays for use by the calling script

at line 163
obtain_icons()

Obtain currently listed icons

at line 193
obtain_ranks()

Obtain ranks

at line 230
array obtain_attach_extensions(mixed $forum_id)

Obtain allowed extensions

Parameters

mixed $forum_id

If false then check for private messaging, if int then check for forum id. If true, then only return extension informations.

Return Value

array

allowed extensions array.

at line 333
obtain_bots()

Obtain active bots

at line 373
obtain_cfg_items($style)

Obtain cfg file data

Parameters

$style

at line 405
obtain_disallowed_usernames()

Obtain disallowed usernames