public function disconnect() {
    if ($this->connected) {
      if (is_a($this->link, 'mysqli')) {
        unset($this->link);
      }
      $this->link = null;
      $this->connected = false;
    }
    return $this->connected;
  }