PHP Class PMA\libraries\controllers\database\DatabaseStructureController

Inheritance: extends PMA\libraries\controllers\DatabaseController
Show file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Protected Properties

Property Type Description
$_db_is_system_schema DB is information_schema
$_is_show_stats whether stats show or not
$_num_tables Number of tables
$_pos Current position in the list
$_tables Tables in the database
$_total_num_tables Number of tables
$_url_query The URL query string

Public Methods

Method Description
__construct ( string $url_query ) DatabaseStructureController constructor
addRemoveFavoriteTablesAction ( ) : void Add or remove favorite tables
handleRealRowCountRequestAction ( ) : boolean Handles request for real row count on database level view page.
indexAction ( ) : void Index action
multiSubmitAction ( ) : void Handles actions related to multiple tables

Protected Methods

Method Description
checkFavoriteTable ( string $current_table ) : true | false Function to check if a table is already in favorite list.
displayTableList ( ) : void Displays the list of tables
getReplicationStatus ( string $table ) : array Returns the replication status of the table.
getStuffForEngineTypeTable ( array $current_table, integer $sum_size, integer $overhead_size ) : array Get the value set for ENGINE table,
getTrackingIcon ( string $table ) : string Returns the tracking icon if the table is tracked
getValuesForAriaTable ( array $current_table, integer $sum_size, integer $overhead_size, integer $formatted_size, string $unit, integer $formatted_overhead, string $overhead_unit ) : array Get values for ARIA/MARIA tables
getValuesForInnodbTable ( array $current_table, integer $sum_size ) : array Get values for InnoDB table
hasTable ( array $db, string $truename ) : boolean Find table with truename
isRowCountApproximated ( array $current_table, boolean $table_is_view ) : array Returns whether the row count is approximated
synchronizeFavoriteTables ( RecentFavoriteTable $fav_instance, string $user, array $favorite_tables ) : void Synchronize favorite tables

Private Methods

Method Description
_getDbInfo ( string $sub_part ) : void Retrieves databse information for further use

Method Details

__construct() public method

DatabaseStructureController constructor
public __construct ( string $url_query )
$url_query string URL query

addRemoveFavoriteTablesAction() public method

Add or remove favorite tables

checkFavoriteTable() protected method

Function to check if a table is already in favorite list.
protected checkFavoriteTable ( string $current_table ) : true | false
$current_table string current table
return true | false

displayTableList() protected method

Displays the list of tables
protected displayTableList ( ) : void
return void

getReplicationStatus() protected method

Returns the replication status of the table.
protected getReplicationStatus ( string $table ) : array
$table string table name
return array

getStuffForEngineTypeTable() protected method

Get the value set for ENGINE table,
protected getStuffForEngineTypeTable ( array $current_table, integer $sum_size, integer $overhead_size ) : array
$current_table array current table
$sum_size integer total table size
$overhead_size integer overhead size
return array

getTrackingIcon() protected method

Returns the tracking icon if the table is tracked
protected getTrackingIcon ( string $table ) : string
$table string table name
return string HTML for tracking icon

getValuesForAriaTable() protected method

Get values for ARIA/MARIA tables
protected getValuesForAriaTable ( array $current_table, integer $sum_size, integer $overhead_size, integer $formatted_size, string $unit, integer $formatted_overhead, string $overhead_unit ) : array
$current_table array current table
$sum_size integer sum size
$overhead_size integer overhead size
$formatted_size integer formatted size
$unit string unit
$formatted_overhead integer overhead formatted
$overhead_unit string overhead unit
return array

getValuesForInnodbTable() protected method

Get values for InnoDB table
protected getValuesForInnodbTable ( array $current_table, integer $sum_size ) : array
$current_table array current table
$sum_size integer sum size
return array

handleRealRowCountRequestAction() public method

Handles request for real row count on database level view page.

hasTable() protected method

Find table with truename
protected hasTable ( array $db, string $truename ) : boolean
$db array DB to look into
$truename string Table name
return boolean

indexAction() public method

Index action
public indexAction ( ) : void
return void

isRowCountApproximated() protected method

Returns whether the row count is approximated
protected isRowCountApproximated ( array $current_table, boolean $table_is_view ) : array
$current_table array array containing details about the table
$table_is_view boolean whether the table is a view
return array

multiSubmitAction() public method

Handles actions related to multiple tables
public multiSubmitAction ( ) : void
return void

synchronizeFavoriteTables() protected method

Synchronize favorite tables
protected synchronizeFavoriteTables ( RecentFavoriteTable $fav_instance, string $user, array $favorite_tables ) : void
$fav_instance PMA\libraries\RecentFavoriteTable Instance of this class
$user string The user hash
$favorite_tables array Existing favorites
return void

Property Details

$_db_is_system_schema protected property

DB is information_schema
protected $_db_is_system_schema

$_is_show_stats protected property

whether stats show or not
protected $_is_show_stats

$_num_tables protected property

Number of tables
protected $_num_tables

$_pos protected property

Current position in the list
protected $_pos

$_tables protected property

Tables in the database
protected $_tables

$_total_num_tables protected property

Number of tables
protected $_total_num_tables

$_url_query protected property

The URL query string
protected $_url_query