4 * Registry of flags used with ParserOutput::{get,append}OutputString()
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
28 namespace MediaWiki\Parser
;
31 * Registry of string sets used with ParserOutput::{get,append}OutputString()
32 * within MediaWiki core.
34 * All string sets used should be defined in this class.
36 * @package MediaWiki\Parser
38 class ParserOutputStringSets
{
40 // These flags are currently stored as ParserOutput properties
43 * @var string ResourceLoader modules to load.
44 * @see \MediaWiki\Output\OutputPage::addModules
45 * @see ParserOutput::addModules
46 * @see ParserOutput::getModules
48 public const MODULE
= 'mw-Module';
51 * @var string Style-only ResourceLoader modules to load.
52 * @see \MediaWiki\Output\OutputPage::addModuleStyles
53 * @see ParserOutput::addModuleStyles
54 * @see ParserOutput::getModuleStyles
56 public const MODULE_STYLE
= 'mw-ModuleStyle';
59 * @var string Extra values for the Content-Security-Policy default-src
61 * @see ParserOutput::addExtraCSPDefaultSrc
62 * @see ParserOutput::getExtraCSPDefaultSrcs
64 public const EXTRA_CSP_DEFAULT_SRC
= 'mw-ExtraCSPDefaultSrc';
67 * @var string Extra values for the Content-Security-Policy script-src
69 * @see ParserOutput::addExtraCSPScriptSrc
70 * @see ParserOutput::getExtraCSPScriptSrcs
72 public const EXTRA_CSP_SCRIPT_SRC
= 'mw-ExtraCspScriptSrc';
75 * @var string Extra values for the Content-Security-Policy style-src
77 * @see ParserOutput::addExtraCSPStyleSrc
78 * @see ParserOutput::getExtraCSPStyleSrcs
80 public const EXTRA_CSP_STYLE_SRC
= 'mw-ExtraCspStyleSrc';
82 public static function cases(): array {
86 self
::EXTRA_CSP_DEFAULT_SRC
,
87 self
::EXTRA_CSP_SCRIPT_SRC
,
88 self
::EXTRA_CSP_STYLE_SRC
,