dbi = $dbi; } public function all(): void { if (! isset($_POST['db'], $_POST['table'])) { $this->response->setRequestStatus(false); $this->response->addJSON(['message' => Message::error()]); return; } $this->response->addJSON(['columns' => $this->dbi->getColumnNames($_POST['db'], $_POST['table'])]); } }