class user extends base_user

Properties

protected driver_interface $db from  base_user
protected config $config from  base_user
protected user_loader $user_loader from  base_user
protected string $phpbb_root_path from  base_user
protected string $php_ext from  base_user
protected string|false $cache_ttl from  base_user

Methods

__construct(driver_interface $db, config $config, user_loader $user_loader, string $phpbb_root_path, string $phpEx)

base_user constructor.

string
query(string $keyword, int $topic_id)

Builds a query 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

in base_user at line 49
__construct(driver_interface $db, config $config, user_loader $user_loader, string $phpbb_root_path, string $phpEx)

base_user constructor.

Parameters

driver_interface $db
config $config
user_loader $user_loader
string $phpbb_root_path
string $phpEx

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

Builds a query based on user input

Parameters

string $keyword

Search string

int $topic_id

Current topic ID

Return Value

string

Query ready for execution

at line 21
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)

in base_user at line 84
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