PHP Class PMA\libraries\controllers\table\TableStructureController

Inheritance: extends PMA\libraries\controllers\TableController
Show file Open project: phpmyadmin/phpmyadmin

Protected Properties

Property Type Description
$_db_is_system_schema DB is information_schema
$_showtable Show table info
$_table_info_num_rows Number of rows
$_tbl_collation Table collation
$_tbl_is_view Table is a view
$_tbl_storage_engine Table storage engine
$_url_query The URL query string
$table_obj The table object

Public Methods

Method Description
__construct ( string $type, string $db, string $table, string $url_query, integer $num_tables, integer $pos, boolean $db_is_system_schema, integer $total_num_tables, array $tables, boolean $is_show_stats, boolean $tbl_is_view, string $tbl_storage_engine, integer $table_info_num_rows, string $tbl_collation, array $showtable ) TableStructureController constructor
indexAction ( ) : void Index action

Protected Methods

Method Description
adjustColumnPrivileges ( array $adjust_privileges ) : boolean Adjusts the Privileges for all the columns whose names have changed
columnNeedsAlterTable ( integer $i ) : boolean Verifies if some elements of a column have changed
displayHtmlForColumnChange ( array $selected, string $action ) : boolean Displays HTML for changing one or more columns
displayHtmlForPartitionChange ( ) : string Displays HTML for partition change
displayStructure ( array $cfgRelation, array $columns_with_unique_index, mixed $url_params, Index | false $primary_index, array $fields, array $columns_with_index ) : string Displays the table structure ('show table' works correct since 3.23.03)
displayTableBrowseForSelectedColumns ( string $goto, string $pmaThemeImage ) : void Function to display table browse for selected columns
getDataForSubmitMult ( string $submit_mult, array $selected, string $action ) : array Get List of information for Submit Mult
getKeyForTablePrimary ( ) : string Gets table primary key
getMultipleFieldCommandType ( ) : string Function to get the type of command for multiple field handling
getTableStats ( ) : string Get HTML snippet for display table statistics
moveColumns ( ) : void Moves columns in the table's structure based on $_REQUEST
updateColumns ( ) : boolean Update the table's structure based on $_REQUEST
updatePartitioning ( ) : void Update the table's partitioning based on $_REQUEST

Private Methods

Method Description
_extractPartitionDetails ( ) : array[] Extracts partition details from CREATE TABLE statement

Method Details

__construct() public method

TableStructureController constructor
public __construct ( string $type, string $db, string $table, string $url_query, integer $num_tables, integer $pos, boolean $db_is_system_schema, integer $total_num_tables, array $tables, boolean $is_show_stats, boolean $tbl_is_view, string $tbl_storage_engine, integer $table_info_num_rows, string $tbl_collation, array $showtable )
$type string Indicate the db_structure or tbl_structure
$db string DB name
$table string Table name
$url_query string URL query
$num_tables integer Number of tables
$pos integer Current position in the list
$db_is_system_schema boolean DB is information_schema
$total_num_tables integer Number of tables
$tables array Tables in the DB
$is_show_stats boolean Whether stats show or not
$tbl_is_view boolean Table is a view
$tbl_storage_engine string Table storage engine
$table_info_num_rows integer Number of rows
$tbl_collation string Table collation
$showtable array Show table info

adjustColumnPrivileges() protected method

Adjusts the Privileges for all the columns whose names have changed
protected adjustColumnPrivileges ( array $adjust_privileges ) : boolean
$adjust_privileges array assoc array of old col names mapped to new cols
return boolean $changed boolean whether at least one column privileges adjusted

columnNeedsAlterTable() protected method

Verifies if some elements of a column have changed
protected columnNeedsAlterTable ( integer $i ) : boolean
$i integer column index in the request
return boolean $alterTableNeeded true if we need to generate ALTER TABLE

displayHtmlForColumnChange() protected method

Displays HTML for changing one or more columns
protected displayHtmlForColumnChange ( array $selected, string $action ) : boolean
$selected array the selected columns
$action string target script to call
return boolean $regenerate true if error occurred

displayHtmlForPartitionChange() protected method

Displays HTML for partition change
protected displayHtmlForPartitionChange ( ) : string
return string HTML for partition change

displayStructure() protected method

Displays the table structure ('show table' works correct since 3.23.03)
protected displayStructure ( array $cfgRelation, array $columns_with_unique_index, mixed $url_params, Index | false $primary_index, array $fields, array $columns_with_index ) : string
$cfgRelation array current relation parameters
$columns_with_unique_index array Columns with unique index
$url_params mixed Contains an associative array with url params
$primary_index PMA\libraries\Index | false primary index or false if no one exists
$fields array Fields
$columns_with_index array Columns with index
return string

displayTableBrowseForSelectedColumns() protected method

Function to display table browse for selected columns
protected displayTableBrowseForSelectedColumns ( string $goto, string $pmaThemeImage ) : void
$goto string goto page url
$pmaThemeImage string URI of the pma theme image
return void

getDataForSubmitMult() protected method

Get List of information for Submit Mult
protected getDataForSubmitMult ( string $submit_mult, array $selected, string $action ) : array
$submit_mult string mult_submit type
$selected array the selected columns
$action string action type
return array

getKeyForTablePrimary() protected method

Gets table primary key
protected getKeyForTablePrimary ( ) : string
return string

getMultipleFieldCommandType() protected method

Function to get the type of command for multiple field handling
protected getMultipleFieldCommandType ( ) : string
return string

getTableStats() protected method

Get HTML snippet for display table statistics
protected getTableStats ( ) : string
return string $html_output

indexAction() public method

Index action
public indexAction ( ) : void
return void

moveColumns() protected method

Moves columns in the table's structure based on $_REQUEST
protected moveColumns ( ) : void
return void

updateColumns() protected method

Update the table's structure based on $_REQUEST
protected updateColumns ( ) : boolean
return boolean $regenerate true if error occurred

updatePartitioning() protected method

Update the table's partitioning based on $_REQUEST
protected updatePartitioning ( ) : void
return void

Property Details

$_db_is_system_schema protected property

DB is information_schema
protected $_db_is_system_schema

$_showtable protected property

Show table info
protected $_showtable

$_table_info_num_rows protected property

Number of rows
protected $_table_info_num_rows

$_tbl_collation protected property

Table collation
protected $_tbl_collation

$_tbl_is_view protected property

Table is a view
protected $_tbl_is_view

$_tbl_storage_engine protected property

Table storage engine
protected $_tbl_storage_engine

$_url_query protected property

The URL query string
protected $_url_query

$table_obj protected property

The table object
protected $table_obj