當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Updater::getComponentsWithUpdateFile方法代碼示例

本文整理匯總了PHP中Piwik\Updater::getComponentsWithUpdateFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP Updater::getComponentsWithUpdateFile方法的具體用法?PHP Updater::getComponentsWithUpdateFile怎麽用?PHP Updater::getComponentsWithUpdateFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Updater的用法示例。


在下文中一共展示了Updater::getComponentsWithUpdateFile方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testUpdaterChecksCoreAndPluginCheckThatCoreIsRanFirst

 public function testUpdaterChecksCoreAndPluginCheckThatCoreIsRanFirst()
 {
     $updater = new Updater(PIWIK_INCLUDE_PATH . '/tests/resources/Updater/core/', PIWIK_INCLUDE_PATH . '/tests/resources/Updater/%s/');
     $updater->markComponentSuccessfullyUpdated('testpluginUpdates', '0.1beta');
     $updater->markComponentSuccessfullyUpdated('core', '0.1');
     $componentsWithUpdateFile = $updater->getComponentsWithUpdateFile(array('testpluginUpdates' => '0.1', 'core' => '0.3'));
     $this->assertEquals(2, count($componentsWithUpdateFile));
     reset($componentsWithUpdateFile);
     $this->assertEquals('core', key($componentsWithUpdateFile));
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:10,代碼來源:UpdaterTest.php

示例2: getComponentUpdates

 public static function getComponentUpdates(Updater $updater)
 {
     $updater->addComponentToCheck('core', Version::VERSION);
     $plugins = \Piwik\Plugin\Manager::getInstance()->getLoadedPlugins();
     foreach ($plugins as $pluginName => $plugin) {
         $updater->addComponentToCheck($pluginName, $plugin->getVersion());
     }
     $componentsWithUpdateFile = $updater->getComponentsWithUpdateFile();
     if (count($componentsWithUpdateFile) == 0 && !$updater->hasNewVersion('core')) {
         return null;
     }
     return $componentsWithUpdateFile;
 }
開發者ID:KiwiJuicer,項目名稱:handball-dachau,代碼行數:13,代碼來源:CoreUpdater.php

示例3: testUpdaterChecksCoreAndPluginCheckThatCoreIsRanFirst

 public function testUpdaterChecksCoreAndPluginCheckThatCoreIsRanFirst()
 {
     $updater = new Updater();
     $updater->pathUpdateFilePlugins = PIWIK_INCLUDE_PATH . '/tests/resources/Updater/%s/';
     $updater->pathUpdateFileCore = PIWIK_INCLUDE_PATH . '/tests/resources/Updater/core/';
     $updater->recordComponentSuccessfullyUpdated('testpluginUpdates', '0.1beta');
     $updater->addComponentToCheck('testpluginUpdates', '0.1');
     $updater->recordComponentSuccessfullyUpdated('core', '0.1');
     $updater->addComponentToCheck('core', '0.3');
     $componentsWithUpdateFile = $updater->getComponentsWithUpdateFile();
     $this->assertEquals(2, count($componentsWithUpdateFile));
     reset($componentsWithUpdateFile);
     $this->assertEquals('core', key($componentsWithUpdateFile));
 }
開發者ID:a4tunado,項目名稱:piwik,代碼行數:14,代碼來源:UpdaterTest.php

示例4: getComponentUpdates

 public static function getComponentUpdates(Updater $updater)
 {
     $updater->addComponentToCheck('core', Version::VERSION);
     $manager = \Piwik\Plugin\Manager::getInstance();
     $plugins = $manager->getLoadedPlugins();
     foreach ($plugins as $pluginName => $plugin) {
         if ($manager->isPluginInstalled($pluginName)) {
             $updater->addComponentToCheck($pluginName, $plugin->getVersion());
         }
     }
     $columnsVersions = ColumnsUpdater::getAllVersions();
     foreach ($columnsVersions as $component => $version) {
         $updater->addComponentToCheck($component, $version);
     }
     $componentsWithUpdateFile = $updater->getComponentsWithUpdateFile();
     if (count($componentsWithUpdateFile) == 0) {
         ColumnsUpdater::onNoUpdateAvailable($columnsVersions);
         if (!$updater->hasNewVersion('core')) {
             return null;
         }
     }
     return $componentsWithUpdateFile;
 }
開發者ID:TensorWrenchOSS,項目名稱:piwik,代碼行數:23,代碼來源:CoreUpdater.php


注:本文中的Piwik\Updater::getComponentsWithUpdateFile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。