MediaWiki  1.23.1
Debug.php
Go to the documentation of this file.
1 <?php
33 class MWDebug {
39  protected static $log = array();
40 
46  protected static $debug = array();
47 
53  protected static $query = array();
54 
60  protected static $enabled = false;
61 
68  protected static $deprecationWarnings = array();
69 
76  public static function init() {
77  self::$enabled = true;
78  }
79 
87  public static function addModules( OutputPage $out ) {
88  if ( self::$enabled ) {
89  $out->addModules( 'mediawiki.debug.init' );
90  }
91  }
92 
101  public static function log( $str ) {
102  if ( !self::$enabled ) {
103  return;
104  }
105 
106  self::$log[] = array(
107  'msg' => htmlspecialchars( $str ),
108  'type' => 'log',
109  'caller' => wfGetCaller(),
110  );
111  }
112 
118  public static function getLog() {
119  return self::$log;
120  }
121 
126  public static function clearLog() {
127  self::$log = array();
128  self::$deprecationWarnings = array();
129  }
130 
144  public static function warning( $msg, $callerOffset = 1, $level = E_USER_NOTICE, $log = 'auto' ) {
145  global $wgDevelopmentWarnings;
146 
147  if ( $log === 'auto' && !$wgDevelopmentWarnings ) {
148  $log = 'debug';
149  }
150 
151  if ( $log === 'debug' ) {
152  $level = false;
153  }
154 
155  $callerDescription = self::getCallerDescription( $callerOffset );
156 
157  self::sendMessage( $msg, $callerDescription, 'warning', $level );
158 
159  if ( self::$enabled ) {
160  self::$log[] = array(
161  'msg' => htmlspecialchars( $msg ),
162  'type' => 'warn',
163  'caller' => $callerDescription['func'],
164  );
165  }
166  }
167 
187  public static function deprecated( $function, $version = false,
188  $component = false, $callerOffset = 2
189  ) {
190  $callerDescription = self::getCallerDescription( $callerOffset );
191  $callerFunc = $callerDescription['func'];
192 
193  $sendToLog = true;
194 
195  // Check to see if there already was a warning about this function
196  if ( isset( self::$deprecationWarnings[$function][$callerFunc] ) ) {
197  return;
198  } elseif ( isset( self::$deprecationWarnings[$function] ) ) {
199  if ( self::$enabled ) {
200  $sendToLog = false;
201  } else {
202  return;
203  }
204  }
205 
206  self::$deprecationWarnings[$function][$callerFunc] = true;
207 
208  if ( $version ) {
209  global $wgDeprecationReleaseLimit;
210  if ( $wgDeprecationReleaseLimit && $component === false ) {
211  # Strip -* off the end of $version so that branches can use the
212  # format #.##-branchname to avoid issues if the branch is merged into
213  # a version of MediaWiki later than what it was branched from
214  $comparableVersion = preg_replace( '/-.*$/', '', $version );
215 
216  # If the comparableVersion is larger than our release limit then
217  # skip the warning message for the deprecation
218  if ( version_compare( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) {
219  $sendToLog = false;
220  }
221  }
222 
223  $component = $component === false ? 'MediaWiki' : $component;
224  $msg = "Use of $function was deprecated in $component $version.";
225  } else {
226  $msg = "Use of $function is deprecated.";
227  }
228 
229  if ( $sendToLog ) {
230  global $wgDevelopmentWarnings; // we could have a more specific $wgDeprecationWarnings setting.
232  $msg,
233  $callerDescription,
234  'deprecated',
235  $wgDevelopmentWarnings ? E_USER_DEPRECATED : false
236  );
237  }
238 
239  if ( self::$enabled ) {
240  $logMsg = htmlspecialchars( $msg ) .
241  Html::rawElement( 'div', array( 'class' => 'mw-debug-backtrace' ),
242  Html::element( 'span', array(), 'Backtrace:' ) . wfBacktrace()
243  );
244 
245  self::$log[] = array(
246  'msg' => $logMsg,
247  'type' => 'deprecated',
248  'caller' => $callerFunc,
249  );
250  }
251  }
252 
260  private static function getCallerDescription( $callerOffset ) {
261  $callers = wfDebugBacktrace();
262 
263  if ( isset( $callers[$callerOffset] ) ) {
264  $callerfile = $callers[$callerOffset];
265  if ( isset( $callerfile['file'] ) && isset( $callerfile['line'] ) ) {
266  $file = $callerfile['file'] . ' at line ' . $callerfile['line'];
267  } else {
268  $file = '(internal function)';
269  }
270  } else {
271  $file = '(unknown location)';
272  }
273 
274  if ( isset( $callers[$callerOffset + 1] ) ) {
275  $callerfunc = $callers[$callerOffset + 1];
276  $func = '';
277  if ( isset( $callerfunc['class'] ) ) {
278  $func .= $callerfunc['class'] . '::';
279  }
280  if ( isset( $callerfunc['function'] ) ) {
281  $func .= $callerfunc['function'];
282  }
283  } else {
284  $func = 'unknown';
285  }
286 
287  return array( 'file' => $file, 'func' => $func );
288  }
289 
299  private static function sendMessage( $msg, $caller, $group, $level ) {
300  $msg .= ' [Called from ' . $caller['func'] . ' in ' . $caller['file'] . ']';
301 
302  if ( $level !== false ) {
303  trigger_error( $msg, $level );
304  }
305 
306  wfDebugLog( $group, $msg, 'log' );
307  }
308 
316  public static function debugMsg( $str ) {
317  global $wgDebugComments, $wgShowDebug;
318 
319  if ( self::$enabled || $wgDebugComments || $wgShowDebug ) {
320  self::$debug[] = rtrim( UtfNormal::cleanUp( $str ) );
321  }
322  }
323 
334  public static function query( $sql, $function, $isMaster ) {
335  if ( !self::$enabled ) {
336  return -1;
337  }
338 
339  self::$query[] = array(
340  'sql' => $sql,
341  'function' => $function,
342  'master' => (bool)$isMaster,
343  'time' => 0.0,
344  '_start' => microtime( true ),
345  );
346 
347  return count( self::$query ) - 1;
348  }
349 
356  public static function queryTime( $id ) {
357  if ( $id === -1 || !self::$enabled ) {
358  return;
359  }
360 
361  self::$query[$id]['time'] = microtime( true ) - self::$query[$id]['_start'];
362  unset( self::$query[$id]['_start'] );
363  }
364 
371  protected static function getFilesIncluded( IContextSource $context ) {
372  $files = get_included_files();
373  $fileList = array();
374  foreach ( $files as $file ) {
375  $size = filesize( $file );
376  $fileList[] = array(
377  'name' => $file,
378  'size' => $context->getLanguage()->formatSize( $size ),
379  );
380  }
381 
382  return $fileList;
383  }
384 
392  public static function getDebugHTML( IContextSource $context ) {
393  global $wgDebugComments;
394 
395  $html = '';
396 
397  if ( self::$enabled ) {
398  MWDebug::log( 'MWDebug output complete' );
399  $debugInfo = self::getDebugInfo( $context );
400 
401  // Cannot use OutputPage::addJsConfigVars because those are already outputted
402  // by the time this method is called.
405  ResourceLoader::makeConfigSetScript( array( 'debugInfo' => $debugInfo ) )
406  )
407  );
408  }
409 
410  if ( $wgDebugComments ) {
411  $html .= "<!-- Debug output:\n" .
412  htmlspecialchars( implode( "\n", self::$debug ) ) .
413  "\n\n-->";
414  }
415 
416  return $html;
417  }
418 
427  public static function getHTMLDebugLog() {
428  global $wgDebugTimestamps, $wgShowDebug;
429 
430  if ( !$wgShowDebug ) {
431  return '';
432  }
433 
434  $curIdent = 0;
435  $ret = "\n<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">\n<li>";
436 
437  foreach ( self::$debug as $line ) {
438  $pre = '';
439  if ( $wgDebugTimestamps ) {
440  $matches = array();
441  if ( preg_match( '/^(\d+\.\d+ {1,3}\d+.\dM\s{2})/', $line, $matches ) ) {
442  $pre = $matches[1];
443  $line = substr( $line, strlen( $pre ) );
444  }
445  }
446  $display = ltrim( $line );
447  $ident = strlen( $line ) - strlen( $display );
448  $diff = $ident - $curIdent;
449 
450  $display = $pre . $display;
451  if ( $display == '' ) {
452  $display = "\xc2\xa0";
453  }
454 
455  if ( !$ident
456  && $diff < 0
457  && substr( $display, 0, 9 ) != 'Entering '
458  && substr( $display, 0, 8 ) != 'Exiting '
459  ) {
460  $ident = $curIdent;
461  $diff = 0;
462  $display = '<span style="background:yellow;">' .
463  nl2br( htmlspecialchars( $display ) ) . '</span>';
464  } else {
465  $display = nl2br( htmlspecialchars( $display ) );
466  }
467 
468  if ( $diff < 0 ) {
469  $ret .= str_repeat( "</li></ul>\n", -$diff ) . "</li><li>\n";
470  } elseif ( $diff == 0 ) {
471  $ret .= "</li><li>\n";
472  } else {
473  $ret .= str_repeat( "<ul><li>\n", $diff );
474  }
475  $ret .= "<code>$display</code>\n";
476 
477  $curIdent = $ident;
478  }
479 
480  $ret .= str_repeat( '</li></ul>', $curIdent ) . "</li>\n</ul>\n";
481 
482  return $ret;
483  }
484 
491  public static function appendDebugInfoToApiResult( IContextSource $context, ApiResult $result ) {
492  if ( !self::$enabled ) {
493  return;
494  }
495 
496  // output errors as debug info, when display_errors is on
497  // this is necessary for all non html output of the api, because that clears all errors first
498  $obContents = ob_get_contents();
499  if ( $obContents ) {
500  $obContentArray = explode( '<br />', $obContents );
501  foreach ( $obContentArray as $obContent ) {
502  if ( trim( $obContent ) ) {
503  self::debugMsg( Sanitizer::stripAllTags( $obContent ) );
504  }
505  }
506  }
507 
508  MWDebug::log( 'MWDebug output complete' );
509  $debugInfo = self::getDebugInfo( $context );
510 
511  $result->setIndexedTagName( $debugInfo, 'debuginfo' );
512  $result->setIndexedTagName( $debugInfo['log'], 'line' );
513  $result->setIndexedTagName( $debugInfo['debugLog'], 'msg' );
514  $result->setIndexedTagName( $debugInfo['queries'], 'query' );
515  $result->setIndexedTagName( $debugInfo['includes'], 'queries' );
516  $result->addValue( null, 'debuginfo', $debugInfo );
517  }
518 
525  public static function getDebugInfo( IContextSource $context ) {
526  if ( !self::$enabled ) {
527  return array();
528  }
529 
530  global $wgVersion, $wgRequestTime;
531  $request = $context->getRequest();
532 
533  // HHVM's reported memory usage from memory_get_peak_usage()
534  // is not useful when passing false, but we continue passing
535  // false for consistency of historical data in zend.
536  // see: https://github.com/facebook/hhvm/issues/2257#issuecomment-39362246
537  $realMemoryUsage = wfIsHHVM();
538 
539  return array(
540  'mwVersion' => $wgVersion,
541  'phpVersion' => PHP_VERSION,
542  'gitRevision' => GitInfo::headSHA1(),
543  'gitBranch' => GitInfo::currentBranch(),
544  'gitViewUrl' => GitInfo::headViewUrl(),
545  'time' => microtime( true ) - $wgRequestTime,
546  'log' => self::$log,
547  'debugLog' => self::$debug,
548  'queries' => self::$query,
549  'request' => array(
550  'method' => $request->getMethod(),
551  'url' => $request->getRequestURL(),
552  'headers' => $request->getAllHeaders(),
553  'params' => $request->getValues(),
554  ),
555  'memory' => $context->getLanguage()->formatSize( memory_get_usage( $realMemoryUsage ) ),
556  'memoryPeak' => $context->getLanguage()->formatSize( memory_get_peak_usage( $realMemoryUsage ) ),
557  'includes' => self::getFilesIncluded( $context ),
558  'profile' => Profiler::instance()->getRawData(),
559  );
560  }
561 }
ResourceLoader\makeLoaderConditionalScript
static makeLoaderConditionalScript( $script)
Returns JS code which runs given JS code if the client-side framework is present.
Definition: ResourceLoader.php:1138
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
MWDebug\getDebugHTML
static getDebugHTML(IContextSource $context)
Returns the HTML to add to the page for the toolbar.
Definition: Debug.php:392
MWDebug\query
static query( $sql, $function, $isMaster)
Begins profiling on a database query.
Definition: Debug.php:334
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ResourceLoader\makeConfigSetScript
static makeConfigSetScript(array $configuration)
Returns JS code which will set the MediaWiki configuration array to the given value.
Definition: ResourceLoader.php:1149
$files
$files
Definition: importImages.php:67
$html
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition: hooks.txt:1530
MWDebug
New debugger system that outputs a toolbar on page view.
Definition: Debug.php:33
Profiler\instance
static instance()
Singleton.
Definition: Profiler.php:127
wfDebugBacktrace
wfDebugBacktrace( $limit=0)
Safety wrapper for debug_backtrace().
Definition: GlobalFunctions.php:1852
UtfNormal\cleanUp
static cleanUp( $string)
The ultimate convenience function! Clean up invalid UTF-8 sequences, and convert to normal form C,...
Definition: UtfNormal.php:79
wfDebugLog
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
Definition: GlobalFunctions.php:1040
GitInfo\headSHA1
static headSHA1()
Definition: GitInfo.php:216
$ret
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
Definition: hooks.txt:1530
MWDebug\debugMsg
static debugMsg( $str)
This is a method to pass messages from wfDebug to the pretty debugger.
Definition: Debug.php:316
MWDebug\getHTMLDebugLog
static getHTMLDebugLog()
Generate debug log in HTML for displaying at the bottom of the main content area.
Definition: Debug.php:427
MWDebug\$debug
static $debug
Debug messages from wfDebug().
Definition: Debug.php:46
MWDebug\getCallerDescription
static getCallerDescription( $callerOffset)
Get an array describing the calling function at a specified offset.
Definition: Debug.php:260
GitInfo\headViewUrl
static headViewUrl()
Definition: GitInfo.php:232
MWDebug\getLog
static getLog()
Returns internal log array.
Definition: Debug.php:118
Html\inlineScript
static inlineScript( $contents)
Output a "<script>" tag with the given contents.
Definition: Html.php:570
Sanitizer\stripAllTags
static stripAllTags( $text)
Take a fragment of (potentially invalid) HTML and return a version with any tags removed,...
Definition: Sanitizer.php:1718
wfBacktrace
wfBacktrace()
Get a debug backtrace as a string.
Definition: GlobalFunctions.php:1886
MWDebug\getFilesIncluded
static getFilesIncluded(IContextSource $context)
Returns a list of files included, along with their size.
Definition: Debug.php:371
$out
$out
Definition: UtfNormalGenerate.php:167
ApiResult
This class represents the result of the API operations.
Definition: ApiResult.php:44
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
$wgRequestTime
$wgRequestTime
Definition: WebStart.php:68
$pre
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped $pre
Definition: hooks.txt:1105
MWDebug\queryTime
static queryTime( $id)
Calculates how long a query took.
Definition: Debug.php:356
MWDebug\$deprecationWarnings
static $deprecationWarnings
Array of functions that have already been warned, formatted function-caller to prevent a buttload of ...
Definition: Debug.php:68
MWDebug\getDebugInfo
static getDebugInfo(IContextSource $context)
Returns the HTML to add to the page for the toolbar.
Definition: Debug.php:525
MWDebug\clearLog
static clearLog()
Clears internal log array and deprecation tracking.
Definition: Debug.php:126
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MWDebug\deprecated
static deprecated( $function, $version=false, $component=false, $callerOffset=2)
Show a warning that $function is deprecated.
Definition: Debug.php:187
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
OutputPage
This class should be covered by a general architecture document which does not exist as of January 20...
Definition: OutputPage.php:38
$line
$line
Definition: cdb.php:57
MWDebug\log
static log( $str)
Adds a line to the log.
Definition: Debug.php:101
MWDebug\appendDebugInfoToApiResult
static appendDebugInfoToApiResult(IContextSource $context, ApiResult $result)
Append the debug info to given ApiResult.
Definition: Debug.php:491
$matches
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
Definition: NoLocalSettings.php:33
$size
$size
Definition: RandomTest.php:75
GitInfo\currentBranch
static currentBranch()
Definition: GitInfo.php:224
$version
$version
Definition: parserTests.php:86
MWDebug\init
static init()
Enabled the debugger and load resource module.
Definition: Debug.php:76
MWDebug\sendMessage
static sendMessage( $msg, $caller, $group, $level)
Send a message to the debug log and optionally also trigger a PHP error, depending on the $level argu...
Definition: Debug.php:299
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
$file
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30
$debug
$debug
Definition: Setup.php:498
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
MWDebug\addModules
static addModules(OutputPage $out)
Add ResourceLoader modules to the OutputPage object if debugging is enabled.
Definition: Debug.php:87
IContextSource\getRequest
getRequest()
Get the WebRequest object.
MWDebug\warning
static warning( $msg, $callerOffset=1, $level=E_USER_NOTICE, $log='auto')
Adds a warning entry to the log.
Definition: Debug.php:144
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
wfIsHHVM
wfIsHHVM()
Check if we are running under HHVM.
Definition: GlobalFunctions.php:2537
MWDebug\$query
static $query
SQL statements of the databses queries.
Definition: Debug.php:53
wfGetCaller
wfGetCaller( $level=2)
Get the name of the function which called this function wfGetCaller( 1 ) is the function with the wfG...
Definition: GlobalFunctions.php:1941
IContextSource\getLanguage
getLanguage()
Get the Language object.
MWDebug\$log
static $log
Log lines.
Definition: Debug.php:39
MWDebug\$enabled
static $enabled
Is the debugger enabled?
Definition: Debug.php:60