Debian Codegraph @

includes/api/Hook/ApiFormatHighlightHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Api\Hook;
4
5 use MediaWiki\Context\IContextSource;
6
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ApiFormatHighlight" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14 interface ApiFormatHighlightHook {
15 /**
16 * Use this hook to syntax-highlight API pretty-printed output.
17 *
18 * @since 1.35
19 *
20 * @param IContextSource $context
21 * @param string $text Text to be highlighted
22 * @param string $mime MIME type of $text
23 * @param string $format API format code for $text
24 * @return bool|void True or no return value to continue, or false and add output
25 * to $context->getOutput() to highlight
26 */
27 public function onApiFormatHighlight( $context, $text, $mime, $format );
28 }