class RecentFavoriteTable

Handles the recently used and favorite tables.

Methods

getInstance(string $type)

Returns class instance.

array
getTables()

Returns the recent/favorite tables array

array
getFromDb()

Returns recently used tables or favorite from phpMyAdmin database.

true|Message
saveToDb()

Save recent/favorite tables into phpMyAdmin database.

boolean
trim()

Trim recent.favorite table according to the NumRecentTables/NumFavoriteTables configuration.

string
getHtmlList()

Return HTML ul.

string
getHtml()

Return HTML.

true|Message
add(string $db, string $table)

Add recently used or favorite tables.

boolean|Message
removeIfInvalid(string $db, string $table)

Removes recent/favorite tables that don't exist.

true|Message
remove(string $db, string $table)

Remove favorite tables.

string
getHtmlSyncFavoriteTables()

Generate Html for sync Favorite tables anchor. (from localStorage to pmadb)

static string
getHtmlUpdateRecentTables()

Generate Html to update recent tables.

Details

at line 78
static RecentFavoriteTable getInstance(string $type)

Returns class instance.

Parameters

string $type the table type

Return Value

RecentFavoriteTable

at line 91
array getTables()

Returns the recent/favorite tables array

Return Value

array

at line 101
array getFromDb()

Returns recently used tables or favorite from phpMyAdmin database.

Return Value

array

at line 124
true|Message saveToDb()

Save recent/favorite tables into phpMyAdmin database.

Return Value

true|Message

at line 165
boolean trim()

Trim recent.favorite table according to the NumRecentTables/NumFavoriteTables configuration.

Return Value

boolean True if trimming occurred

at line 183
string getHtmlList()

Return HTML ul.

Return Value

string

at line 243
string getHtml()

Return HTML.

Return Value

string

at line 268
true|Message add(string $db, string $table)

Add recently used or favorite tables.

Parameters

string $db database name where the table is located
string $table table name

Return Value

true|Message True if success, Message if not

at line 300
boolean|Message removeIfInvalid(string $db, string $table)

Removes recent/favorite tables that don't exist.

Parameters

string $db database
string $table table

Return Value

boolean|Message True if invalid and removed, False if not invalid, Message if error while removing

at line 321
true|Message remove(string $db, string $table)

Remove favorite tables.

Parameters

string $db database name where the table is located
string $table table name

Return Value

true|Message True if success, Message if not

at line 339
string getHtmlSyncFavoriteTables()

Generate Html for sync Favorite tables anchor. (from localStorage to pmadb)

Return Value

string

at line 365
static string getHtmlUpdateRecentTables()

Generate Html to update recent tables.

Return Value

string html