Translated using Weblate (German)
[phpmyadmin.git] / schema_export.php
blobabe2be0b976d1345c0766acc90f2f74916f5596c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Schema export handler
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\DatabaseInterface;
11 use PhpMyAdmin\Di\Container;
12 use PhpMyAdmin\Export;
13 use PhpMyAdmin\Relation;
14 use PhpMyAdmin\Util;
16 if (! defined('ROOT_PATH')) {
17 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
20 require_once ROOT_PATH . 'libraries/common.inc.php';
22 $container = Container::getDefaultContainer();
24 /** @var DatabaseInterface $dbi */
25 $dbi = $container->get(DatabaseInterface::class);
27 /**
28 * get all variables needed for exporting relational schema
29 * in $cfgRelation
31 $relation = new Relation($dbi);
32 $cfgRelation = $relation->getRelationsParam();
34 if (! isset($_REQUEST['export_type'])) {
35 Util::checkParameters(['export_type']);
38 /**
39 * Include the appropriate Schema Class depending on $export_type
40 * default is PDF
42 $export = new Export($dbi);
43 $export->processExportSchema($_REQUEST['export_type']);