mediawiki-extensions-Thanks/ServiceWiring.php
Func b96b4e1fde ServiceWiring: Rename LogStore to ThanksLogStore
`LogStore` is too ambiguous, usually services from extension should
be prefixed with its name.

Change-Id: Ia8a8474ac44ee9990b22ca4650d3ae5311744d19
2023-05-26 21:08:54 +08:00

28 lines
686 B
PHP

<?php
use MediaWiki\Config\ServiceOptions;
use MediaWiki\Extension\Thanks\Storage\LogStore;
use MediaWiki\Extension\Thanks\ThanksQueryHelper;
use MediaWiki\MediaWikiServices;
return [
'ThanksQueryHelper' => static function (
MediaWikiServices $services
): ThanksQueryHelper {
return new ThanksQueryHelper(
$services->getTitleFactory(),
$services->getDBLoadBalancer()
);
},
'ThanksLogStore' => static function ( MediaWikiServices $services ): LogStore {
return new LogStore(
$services->getDBLoadBalancerFactory(),
$services->getActorNormalization(),
new ServiceOptions(
LogStore::CONSTRUCTOR_OPTIONS,
$services->getMainConfig()
)
);
}
];