function disconnect() { $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); if (isset($this->realtime_log_file) && is_resource($this->realtime_log_file)) { fclose($this->realtime_log_file); } unset(self::$connections[$this->getResourceId()]); }
/** * "Proper" disconnect */ public function __destruct() { if ($this->ssh instanceof SSH2) { $this->ssh->disconnect(); } if ($this->sftp instanceof SFTP) { $this->sftp->disconnect(); } }