Piwik\Plugins\CorePluginsAdmin\PluginInstaller::downloadPluginFromMarketplace PHP Method

downloadPluginFromMarketplace() private method

private downloadPluginFromMarketplace ( ) : false | string
return false | string false on failed download, or a path to the downloaded zip file
    private function downloadPluginFromMarketplace()
    {
        try {
            return $this->marketplaceClient->download($this->pluginName);
        } catch (\Exception $e) {
            try {
                $downloadUrl = $this->marketplaceClient->getDownloadUrl($this->pluginName);
                $errorMessage = sprintf('Failed to download plugin from %s: %s', $downloadUrl, $e->getMessage());
            } catch (\Exception $ex) {
                $errorMessage = sprintf('Failed to download plugin: %s', $e->getMessage());
            }
            throw new PluginInstallerException($errorMessage);
        }
    }