dbi = $dbi; } /** * @param array $params Request parameters */ public function __invoke(ServerRequest $request, array $params): void { if (! $this->response->isAjax()) { return; } $kill = (int) $params['id']; $query = $this->dbi->getKillQuery($kill); if ($this->dbi->tryQuery($query)) { $message = Message::success( __('Thread %s was successfully killed.') ); $this->response->setRequestStatus(true); } else { $message = Message::error( __( 'phpMyAdmin was unable to kill thread %s. It probably has already been closed.' ) ); $this->response->setRequestStatus(false); } $message->addParam($kill); $this->response->addJSON(['message' => $message]); } }