Translated using Weblate (Sorani)
[phpmyadmin.git] / tbl_select.php
blob6fe1e02e9bd55b4d95c39335c1ef4a22ffe2b9f1
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Handles table search tab
6 * display table search form, create SQL query from form data
7 * and call Sql::executeQueryAndSendQueryResponse() to execute it
9 * @package PhpMyAdmin
11 declare(strict_types=1);
13 use PhpMyAdmin\Controllers\Table\SearchController;
14 use PhpMyAdmin\Di\Container;
15 use PhpMyAdmin\Response;
16 use Symfony\Component\DependencyInjection\Definition;
18 if (! defined('ROOT_PATH')) {
19 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
22 global $url_query;
24 require_once ROOT_PATH . 'libraries/common.inc.php';
25 require_once ROOT_PATH . 'libraries/tbl_common.inc.php';
27 $container = Container::getDefaultContainer();
28 $container->set(Response::class, Response::getInstance());
29 $container->alias('response', Response::class);
31 /* Define dependencies for the concerned controller */
32 $dependency_definitions = [
33 'db' => $container->get('db'),
34 'table' => $container->get('table'),
35 'searchType' => 'normal',
36 'url_query' => &$url_query
39 /** @var Definition $definition */
40 $definition = $containerBuilder->getDefinition(SearchController::class);
41 array_map(
42 static function (string $parameterName, $value) use ($definition) {
43 $definition->replaceArgument($parameterName, $value);
45 array_keys($dependency_definitions),
46 $dependency_definitions
49 /** @var SearchController $controller */
50 $controller = $containerBuilder->get(SearchController::class);
51 $controller->indexAction();