You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
793 B
35 lines
793 B
<?php |
|
|
|
declare(strict_types=1); |
|
|
|
namespace PhpMyAdmin\Controllers\Server\Status; |
|
|
|
use PhpMyAdmin\Advisor; |
|
use PhpMyAdmin\ResponseRenderer; |
|
use PhpMyAdmin\Server\Status\Data; |
|
use PhpMyAdmin\Template; |
|
|
|
/** |
|
* Displays the advisor feature |
|
*/ |
|
class AdvisorController extends AbstractController |
|
{ |
|
/** @var Advisor */ |
|
private $advisor; |
|
|
|
public function __construct(ResponseRenderer $response, Template $template, Data $data, Advisor $advisor) |
|
{ |
|
parent::__construct($response, $template, $data); |
|
$this->advisor = $advisor; |
|
} |
|
|
|
public function __invoke(): void |
|
{ |
|
$data = []; |
|
if ($this->data->dataLoaded) { |
|
$data = $this->advisor->run(); |
|
} |
|
|
|
$this->render('server/status/advisor/index', ['data' => $data]); |
|
} |
|
}
|
|
|