Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / includes / parser / ParserOutputLinkTypes.php
blob36dd63058d6d6cf2845c90900f5240ff3d1d1079
1 <?php
3 /**
4 * Registry of flags used with ParserOutput::{getLinkList,appendLink}()
5 * within MediaWiki core.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * http://www.gnu.org/copyleft/gpl.html
22 * @since 1.43
24 * @file
25 * @ingroup Parser
28 namespace MediaWiki\Parser;
30 /**
31 * Registry of flags used with ParserOutput::{getLinkList,appendLink}()
32 * within MediaWiki core.
34 * All link types used should be defined in this class.
36 * @package MediaWiki\Parser
38 class ParserOutputLinkTypes {
40 /**
41 * @var string Category links
42 * @see ParserOutput::addCategory
43 * @see ParserOutput::getCategoryMap
44 * @see ParserOutput::getCategoryNames
46 public const CATEGORY = 'category';
48 /**
49 * @var string Interwiki links
50 * @see ParserOutput::addInterwikiLink
51 * @see ParserOutput::getInterwikiLinks
53 public const INTERWIKI = 'interwiki';
55 /**
56 * @var string Language links
57 * @see ParserOutput::addLanguageLink
58 * @see ParserOutput::getLanguageLinks
60 public const LANGUAGE = 'language';
62 /**
63 * @var string Local links
64 * @see ParserOutput::addLink
65 * @see ParserOutput::getLinks
67 public const LOCAL = 'local';
69 /**
70 * @var string Links to media
71 * @see ParserOutput::addImage
72 * @see ParserOutput::getImages
73 * @see ParserOutput::getFileSearchOptions
75 public const MEDIA = 'media';
77 /**
78 * @var string Links to special pages
79 * @see ParserOutput::addLink
80 * @see ParserOutput::getLinksSpecial
82 public const SPECIAL = 'special';
84 /**
85 * @var string Links to templates
86 * @see ParserOutput::addTemplate
87 * @see ParserOutput::getTemplates
88 * @see ParserOutput::getTemplateIds
90 public const TEMPLATE = 'template';
92 public static function cases(): array {
93 return [
94 self::CATEGORY,
95 self::INTERWIKI,
96 self::LANGUAGE,
97 self::LOCAL,
98 self::MEDIA,
99 self::SPECIAL,
100 self::TEMPLATE,