public function download($local, $remote) { $this->checkConnection(); if (!$this->session->getSftp()->receive($remote, $local)) { throw new \RuntimeException('Can not download file.'); } }