SqlController.php 798 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Holds the PhpMyAdmin\Controllers\Server\SqlController
  5. * @package PhpMyAdmin\Controllers\Server
  6. */
  7. declare(strict_types=1);
  8. namespace PhpMyAdmin\Controllers\Server;
  9. use PhpMyAdmin\Config\PageSettings;
  10. use PhpMyAdmin\Controllers\AbstractController;
  11. use PhpMyAdmin\SqlQueryForm;
  12. /**
  13. * Server SQL executor
  14. * @package PhpMyAdmin\Controllers\Server
  15. */
  16. class SqlController extends AbstractController
  17. {
  18. /**
  19. * @param SqlQueryForm $sqlQueryForm SqlQueryForm instance
  20. *
  21. * @return string HTML
  22. */
  23. public function index(SqlQueryForm $sqlQueryForm): string
  24. {
  25. PageSettings::showGroup('Sql');
  26. require_once ROOT_PATH . 'libraries/server_common.inc.php';
  27. return $sqlQueryForm->getHtml();
  28. }
  29. }