dbi = $dbi; } public function __invoke(): void { if (! isset($_POST['db'])) { $this->response->setRequestStatus(false); $this->response->addJSON(['message' => Message::error()]); return; } $this->response->addJSON(['tables' => $this->dbi->getTables($_POST['db'])]); } }