jobqueue: Record stats on how long it takes before a job is run
[lhc/web/wiklou.git] / docs / hooks.txt
index 6e00363..8e9223b 100644 (file)
@@ -420,6 +420,8 @@ $module: ApiBase Module object
 $module: ApiBase Module object
 &$help: Array of HTML strings to be joined for the output.
 $options: Array Options passed to ApiHelp::getHelp
+&$tocData: Array If a TOC is being generated, this array has keys as anchors in
+the page and values as for Linker::generateTOC().
 
 'ApiMain::moduleManager': Called when ApiMain has finished initializing its
 module manager. Can be used to conditionally register API modules.
@@ -1840,6 +1842,11 @@ $param: Associative Array with the following additional options:
     "<div ...>$1</div>").
   - flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
 
+'LogException': Called before an exception (or PHP error) is logged. This is meant for integration
+with external error aggregation services; returning false will NOT prevent logging.
+$e: The exception (in case of a plain old PHP error, a wrapping ErrorException)
+$suppressed: true if the error was suppressed via error_reporting()/wfSuppressWarnings()
+
 'LoginAuthenticateAudit': A login attempt for a valid user account either
 succeeded or failed. No return data is accepted; this hook is for auditing only.
 $user: the User object being authenticated against
@@ -2147,6 +2154,10 @@ $stripState: stripState used (object)
 $parser: Parser object being used
 $text: text that will be returned
 
+'ParserAfterUnstrip': Called after the first unstripGeneral() in Parser::internalParseHalfParsed()
+$parser: Parser object being used
+$text: text that will be returned
+
 'ParserBeforeInternalParse': Called at the beginning of Parser::internalParse().
 $parser: Parser object
 $text: text to parse
@@ -2232,6 +2243,14 @@ $section: the section number, zero-based, but section 0 is usually empty
 &$sectionContent: ref to the content of the section. modify this.
 $showEditLinks: boolean describing whether this section has an edit link
 
+'ParserCacheSaveComplete': Called after a ParserOutput has been committed to
+the parser cache.
+$parserCache: ParserCache object $parserOutput was stored in
+$parserOutput: ParserOutput object that was stored
+$title: Title of the page that was parsed to generate $parserOutput
+$popts: ParserOptions used for generating $parserOutput
+$revId: ID of the revision that was parsed to create $parserOutput
+
 'ParserTestParser': Called when creating a new instance of Parser in
 tests/parser/parserTest.inc.
 $parser: Parser object created
@@ -2781,7 +2800,13 @@ $term: string of search term
 
 'SpecialStatsAddExtra': Add extra statistic at the end of Special:Statistics.
 &$extraStats: Array to save the new stats
-  ( $extraStats['<name of statistic>'] => <value>; )
+  ( $extraStats['<name of statistic>'] => <value>;
+    <value> can be an array with the keys "name" and "number":
+    "name" is the HTML to be displayed in the name column
+    "number" is the number to be displayed.
+    or, <value> can be the number to be displayed and <name> is the
+    message key to use in the name column,
+$context: IContextSource object
 
 'SpecialUploadComplete': Called after successfully uploading a file from
 Special:Upload.
@@ -3285,16 +3310,5 @@ $obj: The XmlDumpWriter object.
 $row: The database row for the revision.
 $text: The revision text.
 
-'XMPGetInfo': Called when obtaining the list of XMP tags to extract. Can be used
-to add additional tags to extract.
-&$items: Array containing information on which items to extract. See XMPInfo for
-  details on the format.
-
-'XMPGetResults': Called just before returning the results array of parsing xmp
-data. Can be used to post-process the results.
-&$data: Array of metadata sections (such as $data['xmp-general']) each section
-  is an array of metadata tags returned (each tag is either a value, or an array
-  of values).
-
 More hooks might be available but undocumented, you can execute
 "php maintenance/findHooks.php" to find hidden ones.