本文整理汇总了PHP中MWDebug::init方法的典型用法代码示例。如果您正苦于以下问题:PHP MWDebug::init方法的具体用法?PHP MWDebug::init怎么用?PHP MWDebug::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MWDebug
的用法示例。
在下文中一共展示了MWDebug::init方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
// Make sure MWDebug class is enabled
static $MWDebugEnabled = false;
if (!$MWDebugEnabled) {
MWDebug::init();
$MWDebugEnabled = true;
}
/** Clear log before each test */
MWDebug::clearLog();
}
示例2: setUp
protected function setUp()
{
parent::setUp();
// Make sure MWDebug class is enabled
static $MWDebugEnabled = false;
if (!$MWDebugEnabled) {
MWDebug::init();
$MWDebugEnabled = true;
}
/** Clear log before each test */
MWDebug::clearLog();
wfSuppressWarnings();
}
示例3: GlobalVarConfig
}
$wgSessionsInObjectCache = true;
if ($wgPHPSessionHandling !== 'enable' && $wgPHPSessionHandling !== 'warn' && $wgPHPSessionHandling !== 'disable') {
$wgPHPSessionHandling = 'warn';
}
if (defined('MW_NO_SESSION')) {
// If the entry point wants no session, force 'disable' here unless they
// specifically set it to the (undocumented) 'warn'.
$wgPHPSessionHandling = MW_NO_SESSION === 'warn' ? 'warn' : 'disable';
}
Profiler::instance()->scopedProfileOut($ps_default);
// Disable MWDebug for command line mode, this prevents MWDebug from eating up
// all the memory from logging SQL queries on maintenance scripts
global $wgCommandLineMode;
if ($wgDebugToolbar && !$wgCommandLineMode) {
MWDebug::init();
}
if (!class_exists('AutoLoader')) {
require_once "{$IP}/includes/AutoLoader.php";
}
// Reset the global service locator, so any services that have already been created will be
// re-created while taking into account any custom settings and extensions.
MediaWikiServices::resetGlobalInstance(new GlobalVarConfig(), 'quick');
if ($wgSharedDB && $wgSharedTables) {
// Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(array_fill_keys($wgSharedTables, ['dbname' => $wgSharedDB, 'schema' => $wgSharedSchema, 'prefix' => $wgSharedPrefix]));
}
// Define a constant that indicates that the bootstrapping of the service locator
// is complete.
define('MW_SERVICE_BOOTSTRAP_COMPLETE', 1);
// Install a header callback to prevent caching of responses with cookies (T127993)
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
MWDebug::init();
MediaWiki\suppressWarnings();
}