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


PHP MWDebug::init方法代码示例

本文整理汇总了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();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:11,代码来源:MWDebugTest.php

示例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();
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:13,代码来源:MWDebugTest.php

示例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)
开发者ID:paladox,项目名称:mediawiki,代码行数:31,代码来源:Setup.php

示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     MWDebug::init();
     MediaWiki\suppressWarnings();
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:6,代码来源:MWDebugTest.php


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