Movatterモバイル変換


[0]ホーム

URL:


MediaWiki master
MWDebug.php
Go to the documentation of this file.
1<?php
7namespaceMediaWiki\Debug;
8
9use LogicException;
10useMediaWiki\Api\ApiResult;
11useMediaWiki\Context\IContextSource;
12useMediaWiki\Html\Html;
13useMediaWiki\Json\FormatJson;
14useMediaWiki\Logger\LegacyLogger;
15useMediaWiki\Output\OutputPage;
16useMediaWiki\Parser\Sanitizer;
17useMediaWiki\ResourceLoader\ResourceLoader;
18useMediaWiki\Utils\GitInfo;
19use ReflectionMethod;
20use UtfNormal;
21use Wikimedia\WrappedString;
22use Wikimedia\WrappedStringList;
23
35classMWDebug {
41protectedstatic$log = [];
42
48protectedstatic$debug = [];
49
55protectedstatic$query = [];
56
62protectedstatic$enabled =false;
63
70protectedstatic$deprecationWarnings = [];
71
75protectedstatic$deprecationFilters = [];
76
80publicstaticfunctionsetup() {
81 global$wgDebugToolbar,
83
84if (
85// Easy to forget to falsify $wgDebugToolbar for static caches.
86// If file cache or CDN cache is on, just disable this (DWIMD).
87$wgUseCdn ||
89// Keep MWDebug off on CLI. This prevents MWDebug from eating up
90// all the memory for logging SQL queries in maintenance scripts.
91MW_ENTRY_POINT ==='cli'
92 ) {
93return;
94 }
95
96if ($wgDebugToolbar ) {
98 }
99 }
100
107publicstaticfunctioninit() {
108 self::$enabled =true;
109 }
110
116publicstaticfunctiondeinit() {
117 self::$enabled =false;
118 }
119
127publicstaticfunctionaddModules(OutputPage $out ) {
128if ( self::$enabled ) {
129 $out->addModules('mediawiki.debug' );
130 }
131 }
132
139publicstaticfunctionlog( $str ) {
140if ( !self::$enabled ) {
141return;
142 }
143if ( !is_string( $str ) ) {
144 $str = print_r( $str,true );
145 }
146 self::$log[] = [
147'msg' => htmlspecialchars( $str ),
148'type' =>'log',
149'caller' =>wfGetCaller(),
150 ];
151 }
152
158publicstaticfunctiongetLog() {
159returnself::$log;
160 }
161
166publicstaticfunctionclearLog() {
167 self::$log = [];
168 self::$deprecationWarnings = [];
169 }
170
182publicstaticfunctionwarning( $msg, $callerOffset = 1, $level = E_USER_NOTICE,$log ='auto' ) {
184
185if ($log ==='auto' && !$wgDevelopmentWarnings ) {
186$log ='debug';
187 }
188
189if ($log ==='debug' ) {
190 $level =false;
191 }
192
193 $callerDescription = self::getCallerDescription( $callerOffset );
194
195 self::sendMessage(
196 self::formatCallerDescription( $msg, $callerDescription ),
197'warning',
198 $level );
199 }
200
215publicstaticfunctiondeprecated( $function, $version =false,
216 $component =false, $callerOffset = 2
217 ) {
218if ( $version ) {
219 $component = $component ?:'MediaWiki';
220 $msg ="Use of $function was deprecated in $component $version.";
221 }else {
222 $msg ="Use of $function is deprecated.";
223 }
224self::deprecatedMsg( $msg, $version, $component, $callerOffset + 1 );
225 }
226
249publicstaticfunctiondetectDeprecatedOverride( $instance, $class, $method, $version =false,
250 $component =false, $callerOffset = 2
251 ) {
252 $reflectionMethod =new ReflectionMethod( $instance, $method );
253 $declaringClass = $reflectionMethod->getDeclaringClass()->getName();
254
255if ( $declaringClass === $class ) {
256// not overridden, nothing to do
257returnfalse;
258 }
259
260if ( $version ) {
261 $component = $component ?:'MediaWiki';
262 $msg ="$declaringClass overrides $method which was deprecated in $component $version.";
263self::deprecatedMsg( $msg, $version, $component, $callerOffset + 1 );
264 }
265
266returntrue;
267 }
268
297publicstaticfunctiondeprecatedMsg( $msg, $version =false,
298 $component =false, $callerOffset = 2
299 ) {
300if ( $callerOffset ===false ) {
301 $callerFunc ='';
302 $rawMsg = $msg;
303 }else {
304 $callerDescription = self::getCallerDescription( $callerOffset );
305 $callerFunc = $callerDescription['func'];
306 $rawMsg = self::formatCallerDescription( $msg, $callerDescription );
307 }
308
309 $sendToLog =true;
310
311// Check to see if there already was a warning about this function
312if ( isset( self::$deprecationWarnings[$msg][$callerFunc] ) ) {
313return;
314 } elseif ( isset( self::$deprecationWarnings[$msg] ) ) {
315if ( self::$enabled ) {
316 $sendToLog =false;
317 }else {
318return;
319 }
320 }
321
322 self::$deprecationWarnings[$msg][$callerFunc] =true;
323
324if ( $version ) {
326
327 $component = $component ?:'MediaWiki';
328if ($wgDeprecationReleaseLimit && $component ==='MediaWiki' ) {
329 # Strip -* off the end of $version so that branches can use the
330 # format #.##-branchname to avoid issues if the branch is merged into
331 # a version of MediaWiki later than what it was branched from
332 $comparableVersion = preg_replace('/-.*$/','', $version );
333
334 # If the comparableVersion is larger than our release limit then
335 # skip the warning message for the deprecation
336if ( version_compare($wgDeprecationReleaseLimit, $comparableVersion,'<' ) ) {
337 $sendToLog =false;
338 }
339 }
340 }
341
343 $rawMsg,
344 $sendToLog,
345 $callerFunc
346 );
347 }
348
361publicstaticfunctionsendRawDeprecated( $msg, $sendToLog =true, $callerFunc ='' ) {
362foreach ( self::$deprecationFilters as $filter => $callback ) {
363if ( preg_match( $filter, $msg ) ) {
364if ( is_callable( $callback ) ) {
365 $callback();
366 }
367return;
368 }
369 }
370
371if ( $sendToLog ) {
372 trigger_error( $msg, E_USER_DEPRECATED );
373 }
374 }
375
383publicstaticfunctionfilterDeprecationForTest(
384string $regex, ?callable $callback =null
385 ): void {
386if ( !defined('MW_PHPUNIT_TEST' ) ) {
387thrownew LogicException( __METHOD__ .' can only be used in tests' );
388 }
389 self::$deprecationFilters[$regex] = $callback;
390 }
391
395publicstaticfunctionclearDeprecationFilters() {
396 self::$deprecationFilters = [];
397 }
398
406privatestaticfunction getCallerDescription( $callerOffset ) {
407 $callers =wfDebugBacktrace();
408
409if ( isset( $callers[$callerOffset] ) ) {
410 $callerfile = $callers[$callerOffset];
411if ( isset( $callerfile['file'] ) && isset( $callerfile['line'] ) ) {
412 $file = $callerfile['file'] .' at line ' . $callerfile['line'];
413 }else {
414 $file ='(internal function)';
415 }
416 }else {
417 $file ='(unknown location)';
418 }
419
420if ( isset( $callers[$callerOffset + 1] ) ) {
421 $callerfunc = $callers[$callerOffset + 1];
422 $func ='';
423if ( isset( $callerfunc['class'] ) ) {
424 $func .= $callerfunc['class'] .'::';
425 }
426if ( isset( $callerfunc['function'] ) ) {
427 $func .= $callerfunc['function'];
428 }
429 }else {
430 $func ='unknown';
431 }
432
433return ['file' => $file,'func' => $func ];
434 }
435
443privatestaticfunction formatCallerDescription( $msg, $caller ) {
444// When changing this, update the below parseCallerDescription() method as well.
445return $msg .' [Called from ' . $caller['func'] .' in ' . $caller['file'] .']';
446 }
447
461publicstaticfunctionparseCallerDescription( $msg ) {
462 $match =null;
463 preg_match('/(.*) \[Called from ([^ ]+) in ([^ ]+) at line (\d+)\]$/', $msg, $match );
464if ( $match ) {
465return [
466'message' =>"{$match[1]} [Called from {$match[2]}]",
467'func' => $match[2],
468'file' => $match[3],
469'line' => (int)$match[4],
470 ];
471 }else {
472returnnull;
473 }
474 }
475
484privatestaticfunction sendMessage( $msg, $group, $level ) {
485if ( $level !==false ) {
486 trigger_error( $msg, $level );
487 }
488
489wfDebugLog( $group, $msg );
490 }
491
502publicstaticfunctiondebugMsg( $str, $context = [] ) {
504
505if ( self::$enabled ||$wgDebugComments ||$wgShowDebug ) {
506if ( $context ) {
507 $prefix ='';
508if ( isset( $context['prefix'] ) ) {
509 $prefix = $context['prefix'];
510 } elseif ( isset( $context['channel'] ) && $context['channel'] !=='wfDebug' ) {
511 $prefix ="[{$context['channel']}] ";
512 }
513if ( isset( $context['seconds_elapsed'] ) && isset( $context['memory_used'] ) ) {
514 $prefix .="{$context['seconds_elapsed']} {$context['memory_used']} ";
515 }
516 $str =LegacyLogger::interpolate( $str, $context );
517 $str = $prefix . $str;
518 }
519 $str = rtrim( UtfNormal\Validator::cleanUp( $str ) );
520 self::$debug[] = $str;
521if ( isset( $context['channel'] ) && $context['channel'] ==='error' ) {
522 $message = isset( $context['exception'] )
523 ? $context['exception']->getMessage()
524 : $str;
525 $real = self::parseCallerDescription( $message );
526if ( $real ) {
527// from wfLogWarning()
528 $message = $real['message'];
529 $caller = $real['func'];
530 }else {
531 $trace = isset( $context['exception'] ) ? $context['exception']->getTrace() : [];
532if ( ( $trace[5]['function'] ??null ) ==='wfDeprecated' ) {
533// from MWExceptionHandler/trigger_error/MWDebug/MWDebug/MWDebug/wfDeprecated()
534 $offset = 6;
535 } elseif ( ( $trace[1]['function'] ??null ) ==='trigger_error' ) {
536// from trigger_error
537 $offset = 2;
538 }else {
539// built-in PHP error
540 $offset = 1;
541 }
542 $frame = $trace[$offset] ?? $trace[0];
543 $caller = ( isset( $frame['class'] ) ? $frame['class'] .'::' :'' )
544 . $frame['function'];
545 }
546
547 self::$log[] = [
548'msg' => htmlspecialchars( $message ),
549'type' =>'warn',
550'caller' => $caller,
551 ];
552 }
553 }
554 }
555
566publicstaticfunctionquery( $sql, $function, $runTime, $dbhost ) {
567if ( !self::$enabled ) {
568returnfalse;
569 }
570
571// Replace invalid UTF-8 chars with a square UTF-8 character
572// This prevents json_encode from erroring out due to binary SQL data
573 $sql = preg_replace(
574'/(
575 [\xC0-\xC1] # Invalid UTF-8 Bytes
576 | [\xF5-\xFF] # Invalid UTF-8 Bytes
577 | \xE0[\x80-\x9F] # Overlong encoding of prior code point
578 | \xF0[\x80-\x8F] # Overlong encoding of prior code point
579 | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start
580 | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start
581 | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start
582 | (?<=[\x0-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle
583 | (?<![\xC2-\xDF]|[\xE0-\xEF]|[\xE0-\xEF][\x80-\xBF]|[\xF0-\xF4]
584 | [\xF0-\xF4][\x80-\xBF]|[\xF0-\xF4][\x80-\xBF]{2})[\x80-\xBF] # Overlong Sequence
585 | (?<=[\xE0-\xEF])[\x80-\xBF](?![\x80-\xBF]) # Short 3 byte sequence
586 | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence
587 | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2)
588 )/x',
589'■',
590 $sql
591 );
592
593// last check for invalid utf8
594 $sql = UtfNormal\Validator::cleanUp( $sql );
595
596 self::$query[] = [
597'sql' =>"$dbhost: $sql",
598'function' => $function,
599'time' => $runTime,
600 ];
601
602returntrue;
603 }
604
611protectedstaticfunctiongetFilesIncluded(IContextSource $context ) {
612 $files = get_included_files();
613 $fileList = [];
614foreach ( $files as $file ) {
615// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
616 $size = @filesize( $file );
617if ( $size ===false ) {
618// Certain files that have been included might then be deleted. This is especially likely to happen
619// in tests, see T351986.
620// Just use a size of 0, but include these files here to try and be as useful as possible.
621 $size = 0;
622 }
623 $fileList[] = [
624'name' => $file,
625'size' => $context->getLanguage()->formatSize( $size ),
626 ];
627 }
628
629return $fileList;
630 }
631
639publicstaticfunctiongetDebugHTML(IContextSource $context ) {
640 global$wgDebugComments;
641
642 $html = [];
643
644if ( self::$enabled ) {
645 self::log('MWDebug output complete' );
646 $debugInfo = self::getDebugInfo( $context );
647
648// Cannot use OutputPage::addJsConfigVars because those are already outputted
649// by the time this method is called.
651'mw.config.set('
652 . FormatJson::encode( ['debugInfo' => $debugInfo ] )
653 .');'
654 );
655 }
656
657if ($wgDebugComments ) {
658 $html[] ='<!-- Debug output:';
659foreach ( self::$debug as $line ) {
660 $html[] = htmlspecialchars( $line, ENT_NOQUOTES );
661 }
662 $html[] ='-->';
663 }
664
665return WrappedString::join("\n", $html );
666 }
667
676publicstaticfunctiongetHTMLDebugLog() {
677 global$wgShowDebug;
678
679 $html = [];
680if ($wgShowDebug ) {
681 $html[] = Html::openElement('div', ['id' =>'mw-html-debug-log' ] );
682 $html[] ="<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">";
683
684foreach ( self::$debug as $line ) {
685 $display = nl2br( htmlspecialchars( trim( $line ) ) );
686
687 $html[] ="<li><code>$display</code></li>";
688 }
689
690 $html[] ='</ul>';
691 $html[] ='</div>';
692 }
693return WrappedString::join("\n", $html );
694 }
695
702publicstaticfunctionappendDebugInfoToApiResult(IContextSource $context,ApiResult $result ) {
703if ( !self::$enabled ) {
704return;
705 }
706
707// output errors as debug info, when display_errors is on
708// this is necessary for all non html output of the api, because that clears all errors first
709 $obContents = ob_get_contents();
710if ( $obContents ) {
711 $obContentArray = explode('<br />', $obContents );
712foreach ( $obContentArray as $obContent ) {
713if ( trim( $obContent ) ) {
714 self::debugMsg( Sanitizer::stripAllTags( $obContent ) );
715 }
716 }
717 }
718
719 self::log('MWDebug output complete' );
720 $debugInfo = self::getDebugInfo( $context );
721
722ApiResult::setIndexedTagName( $debugInfo,'debuginfo' );
723ApiResult::setIndexedTagName( $debugInfo['log'],'line' );
724ApiResult::setIndexedTagName( $debugInfo['debugLog'],'msg' );
725ApiResult::setIndexedTagName( $debugInfo['queries'],'query' );
726ApiResult::setIndexedTagName( $debugInfo['includes'],'queries' );
727 $result->addValue(null,'debuginfo', $debugInfo );
728 }
729
736publicstaticfunctiongetDebugInfo(IContextSource $context ) {
737if ( !self::$enabled ) {
738return [];
739 }
740
741 $request = $context->getRequest();
742
743 $branch = GitInfo::currentBranch();
744if ( GitInfo::isSHA1( $branch ) ) {
745// If it's a detached HEAD, the SHA1 will already be
746// included in the MW version, so don't show it.
747 $branch =false;
748 }
749
750return [
751'mwVersion' =>MW_VERSION,
752'phpEngine' =>'PHP',
753'phpVersion' => PHP_VERSION,
754'gitRevision' => GitInfo::headSHA1(),
755'gitBranch' => $branch,
756'gitViewUrl' => GitInfo::headViewUrl(),
757'time' => $request->getElapsedTime(),
758'log' => self::$log,
759'debugLog' => self::$debug,
760'queries' => self::$query,
761'request' => [
762'method' => $request->getMethod(),
763'url' => $request->getRequestURL(),
764'headers' => $request->getAllHeaders(),
765'params' => $request->getValues(),
766 ],
767'memory' => $context->getLanguage()->formatSize( memory_get_usage() ),
768'memoryPeak' => $context->getLanguage()->formatSize( memory_get_peak_usage() ),
769'includes' => self::getFilesIncluded( $context ),
770 ];
771 }
772}
773
775class_alias( MWDebug::class,'MWDebug' );
MW_VERSION
const MW_VERSION
The running version of MediaWiki.
DefinitionDefines.php:23
wfGetCaller
wfGetCaller( $level=2)
Get the name of the function which called this function wfGetCaller( 1 ) is the function with the wfG...
DefinitionGlobalFunctions.php:969
wfDebugLog
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
DefinitionGlobalFunctions.php:696
wfDebugBacktrace
wfDebugBacktrace( $limit=0)
Safety wrapper for debug_backtrace().
DefinitionGlobalFunctions.php:908
if
if(!defined('MW_SETUP_CALLBACK'))
DefinitionWebStart.php:68
MW_ENTRY_POINT
const MW_ENTRY_POINT
Definitionapi.php:21
MediaWiki\Api\ApiResult
This class represents the result of the API operations.
DefinitionApiResult.php:32
MediaWiki\Api\ApiResult\setIndexedTagName
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
DefinitionApiResult.php:612
MediaWiki\Api\ApiResult\addValue
addValue( $path, $name, $value, $flags=0)
Add value to the output data at the given path.
DefinitionApiResult.php:402
MediaWiki\Debug\MWDebug
Debug toolbar.
DefinitionMWDebug.php:35
MediaWiki\Debug\MWDebug\init
static init()
Enabled the debugger and load resource module.
DefinitionMWDebug.php:107
MediaWiki\Debug\MWDebug\parseCallerDescription
static parseCallerDescription( $msg)
Append a caller description to an error message.
DefinitionMWDebug.php:461
MediaWiki\Debug\MWDebug\clearDeprecationFilters
static clearDeprecationFilters()
Clear all deprecation filters.
DefinitionMWDebug.php:395
MediaWiki\Debug\MWDebug\setup
static setup()
DefinitionMWDebug.php:80
MediaWiki\Debug\MWDebug\query
static query( $sql, $function, $runTime, $dbhost)
Begins profiling on a database query.
DefinitionMWDebug.php:566
MediaWiki\Debug\MWDebug\appendDebugInfoToApiResult
static appendDebugInfoToApiResult(IContextSource $context, ApiResult $result)
Append the debug info to given ApiResult.
DefinitionMWDebug.php:702
MediaWiki\Debug\MWDebug\getLog
static getLog()
Returns internal log array.
DefinitionMWDebug.php:158
MediaWiki\Debug\MWDebug\log
static log( $str)
Adds a line to the log.
DefinitionMWDebug.php:139
MediaWiki\Debug\MWDebug\$log
static array $log
Log lines.
DefinitionMWDebug.php:41
MediaWiki\Debug\MWDebug\warning
static warning( $msg, $callerOffset=1, $level=E_USER_NOTICE, $log='auto')
Adds a warning entry to the log.
DefinitionMWDebug.php:182
MediaWiki\Debug\MWDebug\debugMsg
static debugMsg( $str, $context=[])
This method receives messages from LoggerFactory, wfDebugLog, and MWExceptionHandler.
DefinitionMWDebug.php:502
MediaWiki\Debug\MWDebug\$deprecationWarnings
static array $deprecationWarnings
Array of functions that have already been warned, formatted function-caller to prevent a buttload of ...
DefinitionMWDebug.php:70
MediaWiki\Debug\MWDebug\getFilesIncluded
static getFilesIncluded(IContextSource $context)
Returns a list of files included, along with their size.
DefinitionMWDebug.php:611
MediaWiki\Debug\MWDebug\addModules
static addModules(OutputPage $out)
Add ResourceLoader modules to the OutputPage object if debugging is enabled.
DefinitionMWDebug.php:127
MediaWiki\Debug\MWDebug\$deprecationFilters
static array $deprecationFilters
Keys are regexes, values are optional callbacks to call if the filter is hit.
DefinitionMWDebug.php:75
MediaWiki\Debug\MWDebug\detectDeprecatedOverride
static detectDeprecatedOverride( $instance, $class, $method, $version=false, $component=false, $callerOffset=2)
Show a warning if $method declared in $class is overridden in $instance.
DefinitionMWDebug.php:249
MediaWiki\Debug\MWDebug\filterDeprecationForTest
static filterDeprecationForTest(string $regex, ?callable $callback=null)
Deprecation messages matching the supplied regex will be suppressed.
DefinitionMWDebug.php:383
MediaWiki\Debug\MWDebug\deprecated
static deprecated( $function, $version=false, $component=false, $callerOffset=2)
Show a warning that $function is deprecated.
DefinitionMWDebug.php:215
MediaWiki\Debug\MWDebug\getDebugInfo
static getDebugInfo(IContextSource $context)
Returns the HTML to add to the page for the toolbar.
DefinitionMWDebug.php:736
MediaWiki\Debug\MWDebug\sendRawDeprecated
static sendRawDeprecated( $msg, $sendToLog=true, $callerFunc='')
Send a raw deprecation message to the log and the debug toolbar, without filtering of duplicate messa...
DefinitionMWDebug.php:361
MediaWiki\Debug\MWDebug\$debug
static array $debug
Debug messages from wfDebug().
DefinitionMWDebug.php:48
MediaWiki\Debug\MWDebug\deprecatedMsg
static deprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
DefinitionMWDebug.php:297
MediaWiki\Debug\MWDebug\getDebugHTML
static getDebugHTML(IContextSource $context)
Returns the HTML to add to the page for the toolbar.
DefinitionMWDebug.php:639
MediaWiki\Debug\MWDebug\$enabled
static bool $enabled
Is the debugger enabled?
DefinitionMWDebug.php:62
MediaWiki\Debug\MWDebug\clearLog
static clearLog()
Clears internal log array and deprecation tracking.
DefinitionMWDebug.php:166
MediaWiki\Debug\MWDebug\$query
static array $query
SQL statements of the database queries.
DefinitionMWDebug.php:55
MediaWiki\Debug\MWDebug\deinit
static deinit()
Disable the debugger.
DefinitionMWDebug.php:116
MediaWiki\Debug\MWDebug\getHTMLDebugLog
static getHTMLDebugLog()
Generate debug log in HTML for displaying at the bottom of the main content area.
DefinitionMWDebug.php:676
MediaWiki\Html\Html
This class is a collection of static functions that serve two purposes:
DefinitionHtml.php:43
MediaWiki\Json\FormatJson
JSON formatter wrapper class.
DefinitionFormatJson.php:16
MediaWiki\Logger\LegacyLogger
PSR-3 logger that mimics the historic implementation of MediaWiki's former wfErrorLog logging impleme...
DefinitionLegacyLogger.php:38
MediaWiki\Logger\LegacyLogger\interpolate
static interpolate( $message, array $context)
Interpolate placeholders in logging message.
DefinitionLegacyLogger.php:377
MediaWiki\Output\OutputPage
This is one of the Core classes and should be read at least once by any new developers.
DefinitionOutputPage.php:83
MediaWiki\Output\OutputPage\addModules
addModules( $modules)
Load one or more ResourceLoader modules on this page.
DefinitionOutputPage.php:674
MediaWiki\Parser\Sanitizer
HTML sanitizer for MediaWiki.
DefinitionSanitizer.php:32
MediaWiki\ResourceLoader\ResourceLoader
ResourceLoader is a loading system for JavaScript and CSS resources.
DefinitionResourceLoader.php:78
MediaWiki\ResourceLoader\ResourceLoader\makeInlineScript
static makeInlineScript( $script, $nonce=null)
Make an HTML script that runs given JS code after startup and base modules.
DefinitionResourceLoader.php:1694
MediaWiki\Utils\GitInfo
Fetch status information from a local git repository.
DefinitionGitInfo.php:33
$wgUseCdn
$wgUseCdn
Config variable stub for the UseCdn setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:1697
$wgDeprecationReleaseLimit
$wgDeprecationReleaseLimit
Config variable stub for the DeprecationReleaseLimit setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:3342
$wgDebugComments
$wgDebugComments
Config variable stub for the DebugComments setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:3264
$wgShowDebug
$wgShowDebug
Config variable stub for the ShowDebug setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:3294
$wgDebugToolbar
$wgDebugToolbar
Config variable stub for the DebugToolbar setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:3408
$wgDevelopmentWarnings
$wgDevelopmentWarnings
Config variable stub for the DevelopmentWarnings setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:3336
$wgUseFileCache
$wgUseFileCache
Config variable stub for the UseFileCache setting, for use by phpdoc and IDEs.
Definitionconfig-vars.php:1643
MediaWiki\Context\IContextSource
Interface for objects which can provide a MediaWiki context on request.
DefinitionIContextSource.php:57
MediaWiki\Context\IContextSource\getLanguage
getLanguage()
MediaWiki\Context\IContextSource\getRequest
getRequest()
MediaWiki\Debug
DefinitionDeprecatablePropertyArray.php:3

[8]ページ先頭

©2009-2025 Movatter.jp