File "ConfigController.php"

Full Path: /home/vantageo/public_html/cache/cache/.wp-cli/wp-content/plugins/wp-phpmyadmin-extension/lib/phpMyAdmin/libraries/classes/Controllers/Setup/ConfigController.php
File size: 1.02 KB
MIME-type: text/x-php
Charset: utf-8

<?php

declare(strict_types=1);

namespace PhpMyAdmin\Controllers\Setup;

use PhpMyAdmin\Setup\ConfigGenerator;

use function is_string;

class ConfigController extends AbstractController
{
    /**
     * @param array $params Request parameters
     *
     * @return string HTML
     */
    public function __invoke(array $params): string
    {
        $formset = isset($params['formset']) && is_string($params['formset']) ? $params['formset'] : '';
        $eol = isset($params['eol']) && $params['eol'] === 'win' ? 'win' : 'unix';

        $pages = $this->getPages();

        static $hasCheckPageRefresh = false;
        if (! $hasCheckPageRefresh) {
            $hasCheckPageRefresh = true;
        }

        $config = ConfigGenerator::getConfigFile($this->config);

        return $this->template->render('setup/config/index', [
            'formset' => $formset,
            'pages' => $pages,
            'eol' => $eol,
            'config' => $config,
            'has_check_page_refresh' => $hasCheckPageRefresh,
        ]);
    }
}