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


PHP Maintenance::finalSetup方法代码示例

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


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

示例1: finalSetup

 /**
  * finalSetup() since we need MWException
  */
 public function finalSetup()
 {
     parent::finalSetup();
     $this->regex = $this->getOption('regex') ?: $this->getOption('iregex');
     if ($this->regex) {
         $this->regex = '/' . $this->regex . '/';
         if ($this->hasOption('iregex')) {
             $this->regex .= 'i';
             # case insensitive regex
         }
     }
     if ($this->hasOption('settings')) {
         $this->settings_list = explode(' ', $this->getOption('settings'));
         # Values validation
         foreach ($this->settings_list as $name) {
             if (!preg_match('/^wg[A-Z]/', $name)) {
                 throw new MWException("Variable '{$name}' does start with 'wg'.");
             } elseif (!isset($GLOBALS[$name])) {
                 throw new MWException("Variable '{$name}' is not set.");
             } elseif (!$this->isAllowedVariable($GLOBALS[$name])) {
                 throw new MWException("Variable '{$name}' includes non-array, non-scalar, items.");
             }
         }
     }
 }
开发者ID:admonkey,项目名称:mediawiki,代码行数:28,代码来源:getConfiguration.php

示例2: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgMainWANCache;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     // Inject test autoloader
     require_once __DIR__ . '/../TestsAutoLoader.php';
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     $wgMainCacheType = CACHE_NONE;
     $wgMainWANCache = CACHE_NONE;
     $wgMessageCacheType = CACHE_NONE;
     $wgParserCacheType = CACHE_NONE;
     $wgLanguageConverterCacheType = CACHE_NONE;
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
     // Bug 44192 Do not attempt to send a real e-mail
     Hooks::clear('AlternateUserMailer');
     Hooks::register('AlternateUserMailer', function () {
         return false;
     });
     // xdebug's default of 100 is too low for MediaWiki
     ini_set('xdebug.max_nesting_level', 1000);
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:29,代码来源:phpunit.php

示例3: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgMainWANCache;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     // Inject test autoloader
     require_once __DIR__ . '/../TestsAutoLoader.php';
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     // Make sure all caches and stashes are either disabled or use
     // in-process cache only to prevent tests from using any preconfigured
     // cache meant for the local wiki from outside the test run.
     // See also MediaWikiTestCase::run() which mocks CACHE_DB and APC.
     // Disabled in DefaultSettings, override local settings
     $wgMainWANCache = $wgMainCacheType = CACHE_NONE;
     // Uses CACHE_ANYTHING in DefaultSettings, use hash instead of db
     $wgMessageCacheType = $wgParserCacheType = $wgSessionCacheType = $wgLanguageConverterCacheType = 'hash';
     // Uses db-replicated in DefaultSettings
     $wgMainStash = 'hash';
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
     // Bug 44192 Do not attempt to send a real e-mail
     Hooks::clear('AlternateUserMailer');
     Hooks::register('AlternateUserMailer', function () {
         return false;
     });
     // xdebug's default of 100 is too low for MediaWiki
     ini_set('xdebug.max_nesting_level', 1000);
 }
开发者ID:ngertrudiz,项目名称:mediawiki,代码行数:34,代码来源:phpunit.php

示例4: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     // Inject test autoloader
     self::requireTestsAutoloader();
     TestSetup::applyInitialConfig();
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:7,代码来源:phpunit.php

示例5: finalSetup

 public function finalSetup()
 {
     global $wgDebugToolbar;
     // Debug toolbar makes content uncacheable so we disable it.
     // Has to be done before Setup.php initialize MWDebug
     $wgDebugToolbar = false;
     parent::finalSetup();
 }
开发者ID:kolzchut,项目名称:mediawiki-molsa-new,代码行数:8,代码来源:rebuildFileCache.php

示例6: finalSetup

	public function finalSetup() {
		# This script needs to be run to build the inital l10n cache. But if
		# $wgLanguageCode is not 'en', it won't be able to run because there is
		# no l10n cache. Break the cycle by forcing $wgLanguageCode = 'en'.
		global $wgLanguageCode;
		$wgLanguageCode = 'en';
		parent::finalSetup();
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:8,代码来源:rebuildLocalisationCache.php

示例7: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     if ($this->getDbType() == Maintenance::DB_NONE) {
         global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks;
         $wgUseDatabaseMessages = false;
         $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
         $wgHooks['InterwikiLoadPrefix'][] = 'DumpIterator::disableInterwikis';
     }
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:10,代码来源:dumpIterator.php

示例8: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgMainWANCache;
     global $wgMainStash;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     global $wgSessionProviders;
     global $wgJobTypeConf;
     global $wgAuthManagerConfig, $wgAuth, $wgDisableAuthManager;
     // Inject test autoloader
     require_once __DIR__ . '/../TestsAutoLoader.php';
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     // Make sure all caches and stashes are either disabled or use
     // in-process cache only to prevent tests from using any preconfigured
     // cache meant for the local wiki from outside the test run.
     // See also MediaWikiTestCase::run() which mocks CACHE_DB and APC.
     // Disabled in DefaultSettings, override local settings
     $wgMainWANCache = $wgMainCacheType = CACHE_NONE;
     // Uses CACHE_ANYTHING in DefaultSettings, use hash instead of db
     $wgMessageCacheType = $wgParserCacheType = $wgSessionCacheType = $wgLanguageConverterCacheType = 'hash';
     // Uses db-replicated in DefaultSettings
     $wgMainStash = 'hash';
     // Use memory job queue
     $wgJobTypeConf = ['default' => ['class' => 'JobQueueMemory', 'order' => 'fifo']];
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
     // Generic MediaWiki\Session\SessionManager configuration for tests
     // We use CookieSessionProvider because things might be expecting
     // cookies to show up in a FauxRequest somewhere.
     $wgSessionProviders = [['class' => MediaWiki\Session\CookieSessionProvider::class, 'args' => [['priority' => 30, 'callUserSetCookiesHook' => true]]]];
     // Generic AuthManager configuration for testing
     $wgAuthManagerConfig = ['preauth' => [], 'primaryauth' => [['class' => MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class, 'args' => [['authoritative' => false]]], ['class' => MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class, 'args' => [['authoritative' => true]]]], 'secondaryauth' => []];
     $wgAuth = $wgDisableAuthManager ? new AuthPlugin() : new MediaWiki\Auth\AuthManagerAuthPlugin();
     // Bug 44192 Do not attempt to send a real e-mail
     Hooks::clear('AlternateUserMailer');
     Hooks::register('AlternateUserMailer', function () {
         return false;
     });
     // xdebug's default of 100 is too low for MediaWiki
     ini_set('xdebug.max_nesting_level', 1000);
     // Bug T116683 serialize_precision of 100
     // may break testing against floating point values
     // treated with PHP's serialize()
     ini_set('serialize_precision', 17);
     // TODO: we should call MediaWikiTestCase::prepareServices( new GlobalVarConfig() ) here.
     // But PHPUnit may not be loaded yet, so we have to wait until just
     // before PHPUnit_TextUI_Command::main() is executed at the end of this file.
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:54,代码来源:phpunit.php

示例9: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     $wgMainCacheType = CACHE_NONE;
     $wgMessageCacheType = CACHE_NONE;
     $wgParserCacheType = CACHE_NONE;
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:14,代码来源:phpunit.php

示例10: finalSetup

 public function finalSetup()
 {
     global $wgDebugToolbar, $wgUseFileCache, $wgReadOnly;
     $this->enabled = $wgUseFileCache;
     // Script will handle capturing output and saving it itself
     $wgUseFileCache = false;
     // Debug toolbar makes content uncacheable so we disable it.
     // Has to be done before Setup.php initialize MWDebug
     $wgDebugToolbar = false;
     //  Avoid DB writes (like enotif/counters)
     $wgReadOnly = 'Building cache';
     // avoid DB writes (like enotif/counters)
     parent::finalSetup();
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:14,代码来源:rebuildFileCache.php

示例11: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgMainWANCache;
     global $wgMainStash;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     global $wgSessionProviders;
     global $wgJobTypeConf;
     // Inject test autoloader
     require_once __DIR__ . '/../TestsAutoLoader.php';
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     // Make sure all caches and stashes are either disabled or use
     // in-process cache only to prevent tests from using any preconfigured
     // cache meant for the local wiki from outside the test run.
     // See also MediaWikiTestCase::run() which mocks CACHE_DB and APC.
     // Disabled in DefaultSettings, override local settings
     $wgMainWANCache = $wgMainCacheType = CACHE_NONE;
     // Uses CACHE_ANYTHING in DefaultSettings, use hash instead of db
     $wgMessageCacheType = $wgParserCacheType = $wgSessionCacheType = $wgLanguageConverterCacheType = 'hash';
     // Uses db-replicated in DefaultSettings
     $wgMainStash = 'hash';
     // Use memory job queue
     $wgJobTypeConf = array('default' => array('class' => 'JobQueueMemory', 'order' => 'fifo'));
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
     // Generic MediaWiki\Session\SessionManager configuration for tests
     // We use CookieSessionProvider because things might be expecting
     // cookies to show up in a FauxRequest somewhere.
     $wgSessionProviders = array(array('class' => 'MediaWiki\\Session\\CookieSessionProvider', 'args' => array(array('priority' => 30, 'callUserSetCookiesHook' => true))));
     // Bug 44192 Do not attempt to send a real e-mail
     Hooks::clear('AlternateUserMailer');
     Hooks::register('AlternateUserMailer', function () {
         return false;
     });
     // xdebug's default of 100 is too low for MediaWiki
     ini_set('xdebug.max_nesting_level', 1000);
     // Bug T116683 serialize_precision of 100
     // may break testing against floating point values
     // treated with PHP's serialize()
     ini_set('serialize_precision', 17);
 }
开发者ID:paladox,项目名称:2,代码行数:47,代码来源:phpunit.php

示例12: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     $wgMainCacheType = CACHE_NONE;
     $wgMessageCacheType = CACHE_NONE;
     $wgParserCacheType = CACHE_NONE;
     $wgLanguageConverterCacheType = CACHE_NONE;
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
 }
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:19,代码来源:phpunit.php

示例13: finalSetup

 public function finalSetup()
 {
     parent::finalSetup();
     global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
     global $wgLanguageConverterCacheType, $wgUseDatabaseMessages;
     global $wgLocaltimezone, $wgLocalisationCacheConf;
     global $wgDevelopmentWarnings;
     // wfWarn should cause tests to fail
     $wgDevelopmentWarnings = true;
     $wgMainCacheType = CACHE_NONE;
     $wgMessageCacheType = CACHE_NONE;
     $wgParserCacheType = CACHE_NONE;
     $wgLanguageConverterCacheType = CACHE_NONE;
     $wgUseDatabaseMessages = false;
     # Set for future resets
     // Assume UTC for testing purposes
     $wgLocaltimezone = 'UTC';
     $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
     // Bug 44192 Do not attempt to send a real e-mail
     Hooks::clear('AlternateUserMailer');
     Hooks::register('AlternateUserMailer', function () {
         return false;
     });
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:24,代码来源:phpunit.php


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