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