mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 09:00:04 +00:00
b61a92f052
It didn't vary by the skin version as documented in the Constants class, and merely another instance of GlobalVarConfig. Change-Id: I0acd0366a241e04bb79f6aae5dc52284dfa578df
38 lines
811 B
PHP
38 lines
811 B
PHP
<?php
|
|
|
|
namespace Vector;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use Vector\FeatureManagement\FeatureManager;
|
|
use Vector\Services\LanguageService;
|
|
|
|
/**
|
|
* A service locator for services specific to Vector.
|
|
*
|
|
* @package Vector
|
|
* @internal
|
|
*/
|
|
final class VectorServices {
|
|
|
|
/**
|
|
* Gets the feature manager service.
|
|
*
|
|
* Per its definition in ServiceWiring.php, the feature manager service is bound to the global
|
|
* request and user objects.
|
|
*
|
|
* @return FeatureManager
|
|
*/
|
|
public static function getFeatureManager(): FeatureManager {
|
|
return MediaWikiServices::getInstance()->getService( Constants::SERVICE_FEATURE_MANAGER );
|
|
}
|
|
|
|
/**
|
|
* Gets the language service.
|
|
*
|
|
* @return LanguageService
|
|
*/
|
|
public static function getLanguageService(): LanguageService {
|
|
return new LanguageService();
|
|
}
|
|
}
|