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
9 declare(strict_types
=1);
11 use PhpMyAdmin\Controllers\Table\TableStructureController
;
12 use PhpMyAdmin\Di\Container
;
13 use PhpMyAdmin\Response
;
15 require_once 'libraries/common.inc.php';
17 $container = Container
::getDefaultContainer();
18 $container->factory('PhpMyAdmin\Controllers\Table\TableStructureController');
20 'TableStructureController',
21 'PhpMyAdmin\Controllers\Table\TableStructureController'
23 $container->set('PhpMyAdmin\Response', Response
::getInstance());
24 $container->alias('response', 'PhpMyAdmin\Response');
26 global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine,
27 $table_info_num_rows, $tbl_collation, $showtable;
28 $GLOBALS['dbi']->selectDb($GLOBALS['db']);
29 $table_class_object = $GLOBALS['dbi']->getTable(
33 $reread_info = $table_class_object->getStatusInfo(null, true);
34 $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ?
true : false));
35 if ($table_class_object->isView()) {
37 $tbl_storage_engine = __('View');
40 $tbl_storage_engine = $table_class_object->getStorageEngine();
42 $tbl_collation = $table_class_object->getCollation();
43 $table_info_num_rows = $table_class_object->getNumRows();
44 /* Define dependencies for the concerned controller */
45 $dependency_definitions = [
48 'db_is_system_schema' => $db_is_system_schema,
49 'tbl_is_view' => $tbl_is_view,
50 'tbl_storage_engine' => $tbl_storage_engine,
51 'table_info_num_rows' => $table_info_num_rows,
52 'tbl_collation' => $tbl_collation,
53 'showtable' => $GLOBALS['showtable']
56 /** @var TableStructureController $controller */
57 $controller = $container->get('TableStructureController', $dependency_definitions);
58 $controller->indexAction();