Pagekit\Installer\Controller\UpdateController::downloadAction PHP Method

downloadAction() public method

public downloadAction ( $url )
    public function downloadAction($url)
    {
        $file = tempnam(App::get('path.temp'), 'update_');
        App::session()->set('system.update', $file);
        if (!file_put_contents($file, @fopen($url, 'r'))) {
            App::abort(500, 'Download failed or Path not writable.');
        }
        return [];
    }