3
0
镜像自地址 https://github.com/wikimedia/Vector 已同步 2024-05-30 13:42:48 +08:00
mediawiki-skins-Vector/includes/VectorServices.php
Umherirrender ea4fd5d182 Create a FeatureManagerFactory
Some feature requirements needs access to the request user or title.
Currently the context is given in the ServiceWiring callback,
access to RequestContext::getMain() should be avoided during service
wiring (T218555).
Create a factory to hold the code from the service wiring and call the
factory with the request context from the skin to get a feature manager.

Bug: T359665
Change-Id: I57515ec02ed454620f729a109d0ace43b447b6ce
2024-03-08 20:28:31 +01:00

24 行
397 B
PHP

<?php
namespace MediaWiki\Skins\Vector;
use MediaWiki\Skins\Vector\Services\LanguageService;
/**
* A service locator for services specific to Vector.
*
* @package Vector
* @internal
*/
final class VectorServices {
/**
* Gets the language service.
*
* @return LanguageService
*/
public static function getLanguageService(): LanguageService {
return new LanguageService();
}
}