コード例 #1
0
ファイル: Marketplace.php プロジェクト: JoeHorn/piwik
 public function getPluginInfo($pluginName)
 {
     $marketplace = new MarketplaceApiClient();
     $plugin = $marketplace->getPluginInfo($pluginName);
     $plugin = $this->enrichPluginInformation($plugin);
     return $plugin;
 }
コード例 #2
0
 /**
  * @throws PluginInstallerException
  */
 private function makeSurePluginNameIsValid()
 {
     try {
         $marketplace = new MarketplaceApiClient();
         $pluginDetails = $marketplace->getPluginInfo($this->pluginName);
     } catch (\Exception $e) {
         throw new PluginInstallerException($e->getMessage());
     }
     if (empty($pluginDetails)) {
         throw new PluginInstallerException('This plugin was not found in the Marketplace.');
     }
 }