/** * @return SFTP */ public function closeConnection() { if ($this->Connection->isConnected()) { $this->Connection->disconnect(); } $this->Connection = null; return $this; }
/** * {@inheritdoc} */ public function disconnect() { if ($this->connection instanceof SFTP) { $this->connection->disconnect(); return true; } return false; }
/** * "Proper" disconnect */ public function __destruct() { if ($this->ssh instanceof SSH2) { $this->ssh->disconnect(); } if ($this->sftp instanceof SFTP) { $this->sftp->disconnect(); } }
function disconnect() { if (isset($this->sftp)) { $this->sftp->disconnect(); } }
/** * Disconnect from SFTP. */ public function disconnect() { $this->sftp->disconnect(); $this->sftp = null; }
public function __destruct() { if ($this->sftp) { $this->sftp->disconnect(); } }