MediaWiki fundraising/REL1_35
Constants.php
Go to the documentation of this file.
1<?php
2namespace Vector;
3
4use FatalError;
5
10final class Constants {
15 public const SKIN_NAME = 'vector';
16
17 // These are tightly coupled to PREF_KEY_SKIN_VERSION and skin.json's configs. See skin.json for
18 // documentation.
22 public const SKIN_VERSION_LEGACY = '1';
26 public const SKIN_VERSION_LATEST = '2';
27
31 public const SERVICE_CONFIG = 'Vector.Config';
32
36 public const SERVICE_FEATURE_MANAGER = 'Vector.FeatureManager';
37
38 // These are tightly coupled to skin.json's config.
42 public const CONFIG_KEY_SHOW_SKIN_PREFERENCES = 'VectorShowSkinPreferences';
46 public const CONFIG_KEY_DEFAULT_SKIN_VERSION = 'VectorDefaultSkinVersion';
50 public const CONFIG_KEY_DEFAULT_SKIN_VERSION_FOR_EXISTING_ACCOUNTS =
51 'VectorDefaultSkinVersionForExistingAccounts';
55 public const CONFIG_KEY_DEFAULT_SKIN_VERSION_FOR_NEW_ACCOUNTS =
56 'VectorDefaultSkinVersionForNewAccounts';
57
61 public const CONFIG_KEY_DEFAULT_SIDEBAR_VISIBLE_FOR_AUTHORISED_USER =
62 'VectorDefaultSidebarVisibleForAuthorisedUser';
63
67 public const CONFIG_KEY_DEFAULT_SIDEBAR_VISIBLE_FOR_ANONYMOUS_USER =
68 'VectorDefaultSidebarVisibleForAnonymousUser';
69
73 public const CONFIG_KEY_LAYOUT_MAX_WIDTH = 'VectorLayoutMaxWidth';
74
78 public const PREF_KEY_SKIN_VERSION = 'VectorSkinVersion';
79
83 public const PREF_KEY_SIDEBAR_VISIBLE = 'VectorSidebarVisible';
84
85 // These are used in the Feature Management System.
90 public const CONFIG_KEY_FULLY_INITIALISED = 'FullyInitialised';
91
95 public const REQUIREMENT_FULLY_INITIALISED = 'FullyInitialised';
96
100 public const REQUIREMENT_LATEST_SKIN_VERSION = 'LatestSkinVersion';
101
105 public const FEATURE_LATEST_SKIN = 'LatestSkin';
106
107 // These are used for query parameters.
112 public const QUERY_PARAM_SKIN_VERSION = 'useskinversion';
113
118 private function __construct() {
119 throw new FatalError( "Cannot construct a utility class." );
120 }
121}
Abort the web request with a custom HTML string that will represent the entire response.
A namespace for Vector constants for internal Vector usage only.
Definition Constants.php:10
__construct()
This class is for namespacing constants only.
Retrieve the skin version for the request and compare it with Constants::SKIN_VERSION_LATEST.
Definition Constants.php:2