App\Console\Commands\DestinyManifestCommand::download PHP 메소드

download() 보호된 메소드

protected download ( )
    protected function download()
    {
        $this->output->write('<comment>Downloading manifest version (' . $this->version . ') ... </comment>');
        $tmp = storage_path("{$this->version}.zip");
        \File::put($tmp, file_get_contents($this->url));
        $zip = new \ZipArchive();
        if (!$zip->open($tmp)) {
            throw new \Exception('Unable to open Destiny Manifest from Bungie');
        }
        \File::put($this->versionDb, $zip->getFromIndex(0));
        \File::put($this->versionFile, $this->version);
        $zip->close();
        \File::delete($tmp);
        $this->comment('Done!');
    }