class ListDatabase extends ArrayObject (View source)

Handles database lists

Methods

__construct(DatabaseInterface $dbi, Config $config, UserPrivilegesFactory $userPrivilegesFactory)

No description

array
getList()

No description

void
checkHideDatabase()

checks if the configuration wants to hide some databases

array
retrieve(UserPrivileges $userPrivileges, string|null $likeDbName = null)

retrieves database list from server

void
build(UserPrivileges $userPrivileges)

builds up the list

bool
checkOnlyDatabase(UserPrivileges $userPrivileges)

checks the only_db configuration

bool
exists(string ...$params)

Checks if the given strings exists in the current list, if there is missing at least one item it returns false otherwise true

Details

__construct(DatabaseInterface $dbi, Config $config, UserPrivilegesFactory $userPrivilegesFactory)

No description

Parameters

DatabaseInterface $dbi
Config $config
UserPrivilegesFactory $userPrivilegesFactory

array getList()

No description

Return Value

array

protected void checkHideDatabase()

checks if the configuration wants to hide some databases

Return Value

void

protected array retrieve(UserPrivileges $userPrivileges, string|null $likeDbName = null)

retrieves database list from server

Parameters

UserPrivileges $userPrivileges
string|null $likeDbName

usually a db_name containing wildcards

Return Value

array

void build(UserPrivileges $userPrivileges)

builds up the list

Parameters

UserPrivileges $userPrivileges

Return Value

void

protected bool checkOnlyDatabase(UserPrivileges $userPrivileges)

checks the only_db configuration

Parameters

UserPrivileges $userPrivileges

Return Value

bool

bool exists(string ...$params)

Checks if the given strings exists in the current list, if there is missing at least one item it returns false otherwise true

Parameters

string ...$params

Return Value

bool