2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays table structure infos like columns, indexes, size, rows
5 * and allows manipulation of indexes and columns
10 use PhpMyAdmin\Controllers\Table\TableStructureController
;
11 use PhpMyAdmin\Di\Container
;
12 use PhpMyAdmin\Response
;
14 require_once 'libraries/common.inc.php';
16 $container = Container
::getDefaultContainer();
17 $container->factory('PhpMyAdmin\Controllers\Table\TableStructureController');
19 'TableStructureController',
20 'PhpMyAdmin\Controllers\Table\TableStructureController'
22 $container->set('PhpMyAdmin\Response', Response
::getInstance());
23 $container->alias('response', 'PhpMyAdmin\Response');
25 global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine,
26 $table_info_num_rows, $tbl_collation, $showtable;
27 $GLOBALS['dbi']->selectDb($GLOBALS['db']);
28 $table_class_object = $GLOBALS['dbi']->getTable(
32 $reread_info = $table_class_object->getStatusInfo(null, true);
33 $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ?
true : false));
34 if ($table_class_object->isView()) {
36 $tbl_storage_engine = __('View');
39 $tbl_storage_engine = $table_class_object->getStorageEngine();
41 $tbl_collation = $table_class_object->getCollation();
42 $table_info_num_rows = $table_class_object->getNumRows();
43 /* Define dependencies for the concerned controller */
44 $dependency_definitions = array(
47 'db_is_system_schema' => $db_is_system_schema,
48 'tbl_is_view' => $tbl_is_view,
49 'tbl_storage_engine' => $tbl_storage_engine,
50 'table_info_num_rows' => $table_info_num_rows,
51 'tbl_collation' => $tbl_collation,
52 'showtable' => $GLOBALS['showtable']
55 /** @var TableStructureController $controller */
56 $controller = $container->get('TableStructureController', $dependency_definitions);
57 $controller->indexAction();