Improve create-release script to handle QA branches higher than QA_4_8.
[phpmyadmin.git] / tbl_gis_visualization.php
blobd58267c2abb593815d7efa987928484f1d01374c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * handles creation of the GIS visualizations.
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Controllers\Table\GisVisualizationController;
11 use PhpMyAdmin\Di\Container;
12 use PhpMyAdmin\Response;
13 use PhpMyAdmin\Util;
14 use Symfony\Component\DependencyInjection\Definition;
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();
23 $container->set(Response::class, Response::getInstance());
24 $container->alias('response', Response::class);
26 /* Define dependencies for the concerned controller */
27 $dependency_definitions = [
28 'db' => $container->get('db'),
29 'table' => $container->get('table'),
30 'sql_query' => &$GLOBALS['sql_query'],
31 'url_params' => &$GLOBALS['url_params'],
32 'goto' => Util::getScriptNameForOption(
33 $GLOBALS['cfg']['DefaultTabDatabase'],
34 'database'
36 'back' => 'sql.php',
37 'visualizationSettings' => [],
40 /** @var Definition $definition */
41 $definition = $containerBuilder->getDefinition(GisVisualizationController::class);
42 array_map(
43 static function (string $parameterName, $value) use ($definition) {
44 $definition->replaceArgument($parameterName, $value);
46 array_keys($dependency_definitions),
47 $dependency_definitions
50 /** @var GisVisualizationController $controller */
51 $controller = $containerBuilder->get(GisVisualizationController::class);
52 $controller->indexAction();