src/Installer/SummernoteInstaller.php
private function download(array $options)
    {
        $url = sprintf(self::$archive, $options['version']);
        $this->notify($options['notifier'], self::NOTIFY_DOWNLOAD, $url);

        $zip = @file_get_contents($url, false, $this->createStreamContext($options['notifier']));

        if (false === $zip) {
            throw $this->createException(sprintf('Unable to download Summernote ZIP archive from "%s".', $url));
        }

        $path = tempnam(sys_get_temp_dir(), 'summernote-'.$options['version'].'.zip');

        if (!@file_put_contents($path, $zip)) {
            throw $this->createException(sprintf('Unable to write Summernote ZIP archive to "%s".', $path));
        }

        $this->notify($options['notifier'], self::NOTIFY_DOWNLOAD_COMPLETE, $path);

        return $path;
    }
private function download(array $options)
    {
        $url = sprintf(self::$archive, $options['version']);
        $this->notify($options['notifier'], self::NOTIFY_DOWNLOAD, $url);

        $zip = @file_get_contents($url, false, $this->createStreamContext($options['notifier']));

        if (false === $zip) {
            throw $this->createException(sprintf('Unable to download Summernote ZIP archive from "%s".', $url));
        }

        $path = tempnam(sys_get_temp_dir(), 'summernote-'.$options['version'].'.zip');

        if (!@file_put_contents($path, $zip)) {
            throw $this->createException(sprintf('Unable to write Summernote ZIP archive to "%s".', $path));
        }

        $this->notify($options['notifier'], self::NOTIFY_DOWNLOAD_COMPLETE, $path);

        return $path;
    }
private function download ( array $ options ) { $ url = sprintf ( self :: $ archive , $ options [ 'version' ] ) ; $ this -> notify ( $ options [ 'notifier' ] , self :: NOTIFY_DOWNLOAD , $ url ) ; $ zip = @ file_get_contents ( $ url , false , $ this -> createStreamContext ( $ options [ 'notifier' ] ) ) ; if ( false === $ zip ) { throw $ this -> createException ( sprintf ( 'Unable to download Summernote ZIP archive from "%s".' , $ url ) ) ; } $ path = tempnam ( sys_get_temp_dir ( ) , 'summernote-' . $ options [ 'version' ] . '.zip' ) ; if ( ! @ file_put_contents ( $ path , $ zip ) ) { throw $ this -> createException ( sprintf ( 'Unable to write Summernote ZIP archive to "%s".' , $ path ) ) ; } $ this -> notify ( $ options [ 'notifier' ] , self :: NOTIFY_DOWNLOAD_COMPLETE , $ path ) ; return $ path ; }
@param mixed[] $options

@return string
@param mixed [] $options