abstract class base_group implements source_interface

Properties

protected driver_interface $db
protected config $config
protected helper $helper
protected user $user
protected auth $auth
protected string $phpbb_root_path
protected string $php_ext
protected string|false $cache_ttl
protected array $groups

Methods

__construct(driver_interface $db, config $config, helper $helper, user $user, auth $auth, string $phpbb_root_path, string $phpEx)

base_group constructor.

array
get_groups()

Returns data for all board groups

string
query(string $keyword, int $topic_id)

Builds a query for getting group IDs based on user input

int
get_priority(array $row)

Returns the priority of the currently selected name Please note that simple inner priorities for a certain source can be set with ORDER BY SQL clause

bool
get(array $names, string $keyword, int $topic_id)

Searches database for names to mention and alters the passed array of found items

Details

at line 61
__construct(driver_interface $db, config $config, helper $helper, user $user, auth $auth, string $phpbb_root_path, string $phpEx)

base_group constructor.

Parameters

driver_interface $db
config $config
helper $helper
user $user
auth $auth
string $phpbb_root_path
string $phpEx

at line 82
protected array get_groups()

Returns data for all board groups

Return Value

array

Array of groups' data

at line 128
abstract protected string query(string $keyword, int $topic_id)

Builds a query for getting group IDs based on user input

Parameters

string $keyword

Search string

int $topic_id

Current topic ID

Return Value

string

Query ready for execution

at line 133
int get_priority(array $row)

Returns the priority of the currently selected name Please note that simple inner priorities for a certain source can be set with ORDER BY SQL clause

Parameters

array $row

Array of fetched data for the name type (e.g. user row)

Return Value

int

Priority (defaults to 1)

at line 142
bool get(array $names, string $keyword, int $topic_id)

Searches database for names to mention and alters the passed array of found items

Parameters

array $names

Array of already fetched data with names

string $keyword

Search string

int $topic_id

Current topic ID

Return Value

bool

Whether there are no more satisfying names left