mediawiki-extensions-Discus.../includes/ServiceWiring.php
Bartosz Dziewoński c7723baf72 CommentParser: Replace uses of Title with TitleValue
Another small step towards removing the reliance on global state.

Change-Id: Ifb4a5bcbef6606d02f1c7aa7385d72822cb0bad0
2022-03-18 18:24:34 +00:00

34 lines
1,016 B
PHP

<?php
namespace MediaWiki\Extension\DiscussionTools;
use MediaWiki\MediaWikiServices;
return [
'DiscussionTools.CommentParser' => static function ( MediaWikiServices $services ): CommentParser {
return new CommentParser(
$services->getMainConfig(),
$services->getContentLanguage(),
$services->getLanguageConverterFactory(),
$services->getService( 'DiscussionTools.LanguageData' ),
$services->getTitleParser()
);
},
'DiscussionTools.LanguageData' => static function ( MediaWikiServices $services ): LanguageData {
return new LanguageData(
$services->getMainConfig(),
$services->getContentLanguage(),
$services->getLanguageConverterFactory(),
$services->getSpecialPageFactory()
);
},
'DiscussionTools.SubscriptionStore' => static function ( MediaWikiServices $services ): SubscriptionStore {
return new SubscriptionStore(
$services->getConfigFactory(),
$services->getDBLoadBalancerFactory(),
$services->getReadOnlyMode(),
$services->getUserFactory()
);
}
];