mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-30 18:35:44 +00:00
e46eef19d0
- `MediaWiki\Skins\Vector\Tests` is now the prefix for all tests in the skin - we followed PSR conventions of following folder structure after the prefix - Optimize imports/use order - update namespace in skin.json Bug: T303102 Change-Id: Ib76374d81d973c83adfd6c8e7863ff6d797e655d
38 lines
859 B
PHP
38 lines
859 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Skins\Vector;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use MediaWiki\Skins\Vector\FeatureManagement\FeatureManager;
|
|
use MediaWiki\Skins\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();
|
|
}
|
|
}
|