MediaWiki master
CoreTagHooks.php
Go to the documentation of this file.
1<?php
10namespace MediaWiki\Parser;
11
14
21
30 public static function register( Parser $parser, ServiceOptions $options ) {
31 wfDeprecated( __METHOD__, '1.46' );
32 MediaWikiServices::getInstance()->getParserCoreTagHooks()->register(
33 $parser
34 );
35 }
36
50 public static function pre(
51 ?string $content, array $attribs, Parser $parser, PPFrame $frame
52 ): string {
53 wfDeprecated( __METHOD__, '1.46' );
54 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->pre(
55 $content, $attribs, $parser, $frame
56 );
57 }
58
75 public static function html( ?string $content, array $attributes, Parser $parser ) {
76 wfDeprecated( __METHOD__, '1.46' );
77 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->html(
78 $content, $attributes, $parser
79 );
80 }
81
99 public static function nowiki( ?string $content, array $attributes, Parser $parser ): array {
100 wfDeprecated( __METHOD__, '1.46' );
101 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->nowiki(
102 $content, $attributes, $parser
103 );
104 }
105
123 public static function gallery( ?string $content, array $attributes, Parser $parser ): string {
124 wfDeprecated( __METHOD__, '1.46' );
125 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->gallery(
126 $content, $attributes, $parser
127 );
128 }
129
143 public static function indicator( ?string $content, array $attributes, Parser $parser, PPFrame $frame ): string {
144 wfDeprecated( __METHOD__, '1.46' );
145 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->indicator(
146 $content, $attributes, $parser, $frame
147 );
148 }
149
162 public static function langconvert( ?string $content, array $attributes, Parser $parser, PPFrame $frame ): array {
163 wfDeprecated( __METHOD__, '1.46' );
164 return MediaWikiServices::getInstance()->getParserCoreTagHooks()->langconvert(
165 $content, $attributes, $parser, $frame
166 );
167 }
168
169}
170
172class_alias( CoreTagHooks::class, 'CoreTagHooks' );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
A class for passing options to services.
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
Various tag hooks, registered in every Parser.
static langconvert(?string $content, array $attributes, Parser $parser, PPFrame $frame)
Returns content converted into the requested language variant, using LanguageConverter.
static pre(?string $content, array $attribs, Parser $parser, PPFrame $frame)
Core parser tag hook function for 'pre'.
static nowiki(?string $content, array $attributes, Parser $parser)
Core parser tag hook function for 'nowiki'.
static indicator(?string $content, array $attributes, Parser $parser, PPFrame $frame)
XML-style tag for page status indicators: icons (or short text snippets) usually displayed in the top...
static html(?string $content, array $attributes, Parser $parser)
Core parser tag hook function for 'html', used only when $wgRawHtml is enabled.
static gallery(?string $content, array $attributes, Parser $parser)
Core parser tag hook function for 'gallery'.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:139