public function setOptions(array $options) { // if the host, username or password changes, we should disconnect if ($this->host !== $options['host'] || $this->username !== $options['user'] || $this->password !== $options['pass']) { $this->sftp->disconnect(); } parent::setOptions($options); }