Make WatchedItemStore use MediaWikiServices
[lhc/web/wiklou.git] / includes / ServiceWiring.php
index 5ec1d64..dc2c66b 100644 (file)
@@ -92,6 +92,15 @@ return [
                return $services->getConfigFactory()->makeConfig( 'main' );
        },
 
+       'WatchedItemStore' => function( MediaWikiServices $services ) {
+               $store = new WatchedItemStore(
+                       $services->getDBLoadBalancer(),
+                       new HashBagOStuff( [ 'maxKeys' => 100 ] )
+               );
+               $store->setStatsdDataFactory( RequestContext::getMain()->getStats() );
+               return $store;
+       }
+
        ///////////////////////////////////////////////////////////////////////////
        // NOTE: When adding a service here, don't forget to add a getter function
        // in the MediaWikiServices class. The convenience getter should just call