Kirby\Cli\Command\Plugin::fetch PHP Method

fetch() protected method

Download and extract the plugin
protected fetch ( )
    protected function fetch()
    {
        $this->repo = $this->repo();
        $this->uid = 'kirby-' . str_replace('/', '-', $this->repo) . '-' . uniqid();
        $this->branch = 'master';
        $this->zip = $this->tmp($this->uid . '.zip');
        $this->tmp = $this->tmp($this->uid);
        // download the file
        $this->download(['repo' => $this->repo, 'branch' => $this->branch, 'zip' => $this->zip, 'output' => $this->output]);
        // unzip the file
        $this->unzip($this->zip, $this->tmp);
        // grab the info from the plugin
        $this->info();
    }