コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function isConnected()
 {
     if ($this->connection instanceof SFTP) {
         return $this->connection->isConnected();
     }
     return false;
 }
コード例 #2
0
ファイル: SFTP.php プロジェクト: BozzaCoon/SPHERE-Framework
 /**
  * @return SFTP
  * @throws ComponentException
  */
 public function persistConnection()
 {
     if (!$this->Connection->isConnected()) {
         $this->openConnection($this->Host, $this->Port, $this->Timeout);
         if (null === $this->Key) {
             $this->loginCredential($this->Username, $this->Password);
         } else {
             $this->loginCredentialKey($this->Username, $this->Key, $this->Password);
         }
     }
     return $this;
 }
コード例 #3
0
 protected function isConnected()
 {
     return $this->sftp->isConnected();
 }