/** * Checks whether or not the connection to the server is working. * If it has gone down, an automatic reconnection is attempted. * * @return bool */ public function ping() { if (!$this->adapter->ping()) { // reconnect to the server $this->adapter->reconnect(); } return true; }