当前位置: 首页>>代码示例>>PHP>>正文


PHP DeferredUpdates::clearPendingUpdates方法代码示例

本文整理汇总了PHP中DeferredUpdates::clearPendingUpdates方法的典型用法代码示例。如果您正苦于以下问题:PHP DeferredUpdates::clearPendingUpdates方法的具体用法?PHP DeferredUpdates::clearPendingUpdates怎么用?PHP DeferredUpdates::clearPendingUpdates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DeferredUpdates的用法示例。


在下文中一共展示了DeferredUpdates::clearPendingUpdates方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgParserCacheType, $wgNamespaceAliases, $wgNamespaceProtection, $parserMemc;
     $tmpDir = $this->getNewTempDirectory();
     $tmpGlobals = [];
     $tmpGlobals['wgScript'] = '/index.php';
     $tmpGlobals['wgScriptPath'] = '/';
     $tmpGlobals['wgArticlePath'] = '/wiki/$1';
     $tmpGlobals['wgStylePath'] = '/skins';
     $tmpGlobals['wgThumbnailScriptPath'] = false;
     $tmpGlobals['wgLocalFileRepo'] = ['class' => 'LocalRepo', 'name' => 'local', 'url' => 'http://example.com/images', 'hashLevels' => 2, 'transformVia404' => false, 'backend' => new FSFileBackend(['name' => 'local-backend', 'wikiId' => wfWikiID(), 'containerPaths' => ['local-public' => "{$tmpDir}/test-repo/public", 'local-thumb' => "{$tmpDir}/test-repo/thumb", 'local-temp' => "{$tmpDir}/test-repo/temp", 'local-deleted' => "{$tmpDir}/test-repo/delete"]])];
     foreach ($tmpGlobals as $var => $val) {
         if (array_key_exists($var, $GLOBALS)) {
             $this->savedGlobals[$var] = $GLOBALS[$var];
         }
         $GLOBALS[$var] = $val;
     }
     $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
     $wgNamespaceAliases['Image'] = NS_FILE;
     $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
     $wgParserCacheType = CACHE_NONE;
     DeferredUpdates::clearPendingUpdates();
     $wgMemc = wfGetMainCache();
     $messageMemc = wfGetMessageCacheStorage();
     $parserMemc = wfGetParserCacheStorage();
     RequestContext::resetMain();
     $context = RequestContext::getMain();
     $wgUser = new User();
     $wgLang = $context->getLanguage();
     $wgOut = $context->getOutput();
     $wgParser = new StubObject('wgParser', $wgParserConf['class'], [$wgParserConf]);
     $wgRequest = $context->getRequest();
     if ($wgStyleDirectory === false) {
         $wgStyleDirectory = "{$IP}/skins";
     }
     RepoGroup::destroySingleton();
     FileBackendGroup::destroySingleton();
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:38,代码来源:UploadFromUrlTestSuite.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->called['setUp'] = true;
     $this->phpErrorLevel = intval(ini_get('error_reporting'));
     // Cleaning up temporary files
     foreach ($this->tmpFiles as $fileName) {
         if (is_file($fileName) || is_link($fileName)) {
             unlink($fileName);
         } elseif (is_dir($fileName)) {
             wfRecursiveRemoveDir($fileName);
         }
     }
     if ($this->needsDB() && $this->db) {
         // Clean up open transactions
         while ($this->db->trxLevel() > 0) {
             $this->db->rollback(__METHOD__, 'flush');
         }
     }
     DeferredUpdates::clearPendingUpdates();
     ob_start('MediaWikiTestCase::wfResetOutputBuffersBarrier');
 }
开发者ID:admonkey,项目名称:mediawiki,代码行数:22,代码来源:MediaWikiTestCase.php

示例3: clearPendingDeferredUpdates

 /**
  * @since 2.4
  */
 public static function clearPendingDeferredUpdates()
 {
     DeferredCallableUpdate::releasePendingUpdates();
     \DeferredUpdates::clearPendingUpdates();
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:8,代码来源:TestEnvironment.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->called['setUp'] = true;
     $this->phpErrorLevel = intval(ini_get('error_reporting'));
     // Cleaning up temporary files
     foreach ($this->tmpFiles as $fileName) {
         if (is_file($fileName) || is_link($fileName)) {
             unlink($fileName);
         } elseif (is_dir($fileName)) {
             wfRecursiveRemoveDir($fileName);
         }
     }
     if ($this->needsDB() && $this->db) {
         // Clean up open transactions
         while ($this->db->trxLevel() > 0) {
             $this->db->rollback();
         }
         // don't ignore DB errors
         $this->db->ignoreErrors(false);
     }
     DeferredUpdates::clearPendingUpdates();
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:23,代码来源:MediaWikiTestCase.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->called['setUp'] = true;
     $this->phpErrorLevel = intval(ini_get('error_reporting'));
     // Cleaning up temporary files
     foreach ($this->tmpFiles as $fileName) {
         if (is_file($fileName) || is_link($fileName)) {
             unlink($fileName);
         } elseif (is_dir($fileName)) {
             wfRecursiveRemoveDir($fileName);
         }
     }
     if ($this->needsDB() && $this->db) {
         // Clean up open transactions
         while ($this->db->trxLevel() > 0) {
             $this->db->rollback(__METHOD__, 'flush');
         }
         // Check for unsafe queries
         if ($this->db->getType() === 'mysql') {
             $this->db->query("SET sql_mode = 'STRICT_ALL_TABLES'");
         }
     }
     DeferredUpdates::clearPendingUpdates();
     ObjectCache::getMainWANInstance()->clearProcessCache();
     // XXX: reset maintenance triggers
     // Hook into period lag checks which often happen in long-running scripts
     $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
     Maintenance::setLBFactoryTriggers($lbFactory);
     ob_start('MediaWikiTestCase::wfResetOutputBuffersBarrier');
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:31,代码来源:MediaWikiTestCase.php


注:本文中的DeferredUpdates::clearPendingUpdates方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。