当前位置: 首页>>代码示例>>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;未经允许,请勿转载。