aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/tbl_chart.php
blob: e7964461aaa1d014b88b8e3af1a080be6725b27d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * handles creation of the chart
 *
 * @package PhpMyAdmin
 */
declare(strict_types=1);

use PhpMyAdmin\Controllers\Table\ChartController;
use Symfony\Component\DependencyInjection\Definition;

if (! defined('ROOT_PATH')) {
    define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
}

require_once ROOT_PATH . 'libraries/common.inc.php';

/* Define dependencies for the concerned controller */
$dependency_definitions = [
    'sql_query' => &$GLOBALS['sql_query'],
    'url_query' => &$GLOBALS['url_query'],
    'cfg' => &$GLOBALS['cfg'],
];

/** @var Definition $definition */
$definition = $containerBuilder->getDefinition(ChartController::class);
array_map(
    static function (string $parameterName, $value) use ($definition) {
        $definition->replaceArgument($parameterName, $value);
    },
    array_keys($dependency_definitions),
    $dependency_definitions
);

/** @var ChartController $controller */
$controller = $containerBuilder->get(ChartController::class);
$controller->indexAction();