[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Debug toolbar related code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 584 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MWDebug:: (17 methods):
init()
addModules()
log()
getLog()
clearLog()
warning()
deprecated()
getCallerDescription()
sendMessage()
debugMsg()
query()
queryTime()
getFilesIncluded()
getDebugHTML()
getHTMLDebugLog()
appendDebugInfoToApiResult()
getDebugInfo()
init() X-Ref |
Enabled the debugger and load resource module. This is called by Setup.php when $wgDebugToolbar is true. |
addModules( OutputPage $out ) X-Ref |
Add ResourceLoader modules to the OutputPage object if debugging is enabled. param: OutputPage $out |
log( $str ) X-Ref |
Adds a line to the log param: string $str |
getLog() X-Ref |
Returns internal log array return: array |
clearLog() X-Ref |
Clears internal log array and deprecation tracking |
warning( $msg, $callerOffset = 1, $level = E_USER_NOTICE, $log = 'auto' ) X-Ref |
Adds a warning entry to the log param: string $msg param: int $callerOffset param: int $level A PHP error level. See sendMessage() param: string $log 'production' will always trigger a php error, 'auto' return: mixed |
deprecated( $function, $version = false,$component = false, $callerOffset = 2) X-Ref |
Show a warning that $function is deprecated. This will send it to the following locations: - Debug toolbar, with one item per function and caller, if $wgDebugToolbar is set to true. - PHP's error log, with level E_USER_DEPRECATED, if $wgDevelopmentWarnings is set to true. - MediaWiki's debug log, if $wgDevelopmentWarnings is set to false. param: string $function Function that is deprecated. param: string|bool $version Version in which the function was deprecated. param: string|bool $component Component to which the function belongs. param: int $callerOffset How far up the callstack is the original |
getCallerDescription( $callerOffset ) X-Ref |
Get an array describing the calling function at a specified offset. param: int $callerOffset How far up the callstack is the original return: array Array with two keys: 'file' and 'func' |
sendMessage( $msg, $caller, $group, $level ) X-Ref |
Send a message to the debug log and optionally also trigger a PHP error, depending on the $level argument. param: string $msg Message to send param: array $caller Caller description get from getCallerDescription() param: string $group Log group on which to send the message param: int|bool $level Error level to use; set to false to not trigger an error |
debugMsg( $str ) X-Ref |
This is a method to pass messages from wfDebug to the pretty debugger. Do NOT use this method, use MWDebug::log or wfDebug() param: string $str |
query( $sql, $function, $isMaster ) X-Ref |
Begins profiling on a database query param: string $sql param: string $function param: bool $isMaster return: int ID number of the query to pass to queryTime or -1 if the |
queryTime( $id ) X-Ref |
Calculates how long a query took. param: int $id |
getFilesIncluded( IContextSource $context ) X-Ref |
Returns a list of files included, along with their size param: IContextSource $context return: array |
getDebugHTML( IContextSource $context ) X-Ref |
Returns the HTML to add to the page for the toolbar param: IContextSource $context return: string |
getHTMLDebugLog() X-Ref |
Generate debug log in HTML for displaying at the bottom of the main content area. If $wgShowDebug is false, an empty string is always returned. return: string HTML fragment |
appendDebugInfoToApiResult( IContextSource $context, ApiResult $result ) X-Ref |
Append the debug info to given ApiResult param: IContextSource $context param: ApiResult $result |
getDebugInfo( IContextSource $context ) X-Ref |
Returns the HTML to add to the page for the toolbar param: IContextSource $context return: array |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |