PHP Класс PMA\libraries\RecentFavoriteTable

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
add ( string $db, string $table ) : true | Message Add recently used or favorite tables.
getFromDb ( ) : array Returns recently used tables or favorite from phpMyAdmin database.
getHtml ( ) : string Return HTML.
getHtmlList ( ) : string Return HTML ul.
getHtmlSyncFavoriteTables ( ) : string Generate Html for sync Favorite tables anchor. (from localStorage to pmadb)
getHtmlUpdateRecentTables ( ) : string Generate Html to update recent tables.
getInstance ( string $type ) : RecentFavoriteTable Returns class instance.
getTables ( ) : array Returns the recent/favorite tables array
remove ( string $db, string $table ) : true | Message Remove favorite tables.
removeIfInvalid ( string $db, string $table ) : boolean | Message Removes recent/favorite tables that don't exist.
saveToDb ( ) : true | Message Save recent/favorite tables into phpMyAdmin database.
trim ( ) : boolean Trim recent.favorite table according to the NumRecentTables/NumFavoriteTables configuration.

Приватные методы

Метод Описание
__construct ( string $type ) Creates a new instance of RecentFavoriteTable
_getPmaTable ( ) : string Reutrn the name of the configuration storage table

Описание методов

add() публичный Метод

Add recently used or favorite tables.
public add ( string $db, string $table ) : true | Message
$db string database name where the table is located
$table string table name
Результат true | Message True if success, Message if not

getFromDb() публичный Метод

Returns recently used tables or favorite from phpMyAdmin database.
public getFromDb ( ) : array
Результат array

getHtml() публичный Метод

Return HTML.
public getHtml ( ) : string
Результат string

getHtmlList() публичный Метод

Return HTML ul.
public getHtmlList ( ) : string
Результат string

getHtmlSyncFavoriteTables() публичный Метод

Generate Html for sync Favorite tables anchor. (from localStorage to pmadb)
public getHtmlSyncFavoriteTables ( ) : string
Результат string

getHtmlUpdateRecentTables() публичный статический Метод

Generate Html to update recent tables.
public static getHtmlUpdateRecentTables ( ) : string
Результат string html

getInstance() публичный статический Метод

Returns class instance.
public static getInstance ( string $type ) : RecentFavoriteTable
$type string the table type
Результат RecentFavoriteTable

getTables() публичный Метод

Returns the recent/favorite tables array
public getTables ( ) : array
Результат array

remove() публичный Метод

Remove favorite tables.
public remove ( string $db, string $table ) : true | Message
$db string database name where the table is located
$table string table name
Результат true | Message True if success, Message if not

removeIfInvalid() публичный Метод

Removes recent/favorite tables that don't exist.
public removeIfInvalid ( string $db, string $table ) : boolean | Message
$db string database
$table string table
Результат boolean | Message True if invalid and removed, False if not invalid, Message if error while removing

saveToDb() публичный Метод

Save recent/favorite tables into phpMyAdmin database.
public saveToDb ( ) : true | Message
Результат true | Message

trim() публичный Метод

Trim recent.favorite table according to the NumRecentTables/NumFavoriteTables configuration.
public trim ( ) : boolean
Результат boolean True if trimming occurred