2020-08-12 15:05:06 +00:00
|
|
|
<?php
|
|
|
|
|
2022-05-23 07:32:40 +00:00
|
|
|
namespace MediaWiki\Skins\Vector;
|
2020-08-12 15:05:06 +00:00
|
|
|
|
|
|
|
use MediaWiki\MediaWikiServices;
|
2022-05-23 07:32:40 +00:00
|
|
|
use MediaWiki\Skins\Vector\FeatureManagement\FeatureManager;
|
|
|
|
use MediaWiki\Skins\Vector\Services\LanguageService;
|
2020-08-12 15:05:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
2022-04-05 13:54:23 +00:00
|
|
|
* request and user objects.
|
2020-08-12 15:05:06 +00:00
|
|
|
*
|
|
|
|
* @return FeatureManager
|
|
|
|
*/
|
|
|
|
public static function getFeatureManager(): FeatureManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( Constants::SERVICE_FEATURE_MANAGER );
|
|
|
|
}
|
2021-06-30 12:51:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the language service.
|
|
|
|
*
|
|
|
|
* @return LanguageService
|
|
|
|
*/
|
|
|
|
public static function getLanguageService(): LanguageService {
|
|
|
|
return new LanguageService();
|
|
|
|
}
|
2020-08-12 15:05:06 +00:00
|
|
|
}
|