Esempio n. 1
0
 /**
  * @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;
 }
Esempio n. 3
0
 /**
  * "Proper" disconnect
  */
 public function __destruct()
 {
     if ($this->ssh instanceof SSH2) {
         $this->ssh->disconnect();
     }
     if ($this->sftp instanceof SFTP) {
         $this->sftp->disconnect();
     }
 }
Esempio n. 4
0
 function disconnect()
 {
     if (isset($this->sftp)) {
         $this->sftp->disconnect();
     }
 }
 /**
  * Disconnect from SFTP.
  */
 public function disconnect()
 {
     $this->sftp->disconnect();
     $this->sftp = null;
 }
Esempio n. 6
0
 public function __destruct()
 {
     if ($this->sftp) {
         $this->sftp->disconnect();
     }
 }