Improve create-release script to handle QA branches higher than QA_4_8.
[phpmyadmin.git] / schema_export.php
blob62cd13135a565fc64641dc43caf9dcf48bb54f3b
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 /** @var Relation $relation */
32 $relation = $containerBuilder->get('relation');
33 $cfgRelation = $relation->getRelationsParam();
35 if (! isset($_REQUEST['export_type'])) {
36 Util::checkParameters(['export_type']);
39 /**
40 * Include the appropriate Schema Class depending on $export_type
41 * default is PDF
43 /** @var Export $export */
44 $export = $containerBuilder->get('export');
45 $export->processExportSchema($_REQUEST['export_type']);