/** * {@inheritdoc} */ public function isConnected() { if ($this->connection instanceof SFTP) { return $this->connection->isConnected(); } return false; }
/** * @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; }
protected function isConnected() { return $this->sftp->isConnected(); }