mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
ea4fd5d182
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
24 lines
397 B
PHP
24 lines
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();
|
|
}
|
|
}
|