28 use Psr\Log\LoggerInterface;
50 private $actorStoreFactory;
53 private $blockRestrictionStoreFactory;
56 private $commentStore;
59 private $hookContainer;
62 private $loadBalancerFactory;
65 private $readOnlyMode;
71 private $storeCache = [];
86 LoggerInterface $logger,
97 $this->options = $options;
98 $this->logger = $logger;
99 $this->actorStoreFactory = $actorStoreFactory;
100 $this->blockRestrictionStoreFactory = $blockRestrictionStoreFactory;
101 $this->commentStore = $commentStore;
102 $this->hookContainer = $hookContainer;
103 $this->loadBalancerFactory = $loadBalancerFactory;
104 $this->readOnlyMode = $readOnlyMode;
105 $this->userFactory = $userFactory;
113 if ( is_string( $wikiId ) && $this->loadBalancerFactory->getLocalDomainID() === $wikiId ) {
114 $wikiId = DatabaseBlock::LOCAL;
117 $storeCacheKey = $wikiId === DatabaseBlock::LOCAL ?
'LOCAL' :
'crosswikistore-' . $wikiId;
118 if ( !isset( $this->storeCache[$storeCacheKey] ) ) {
122 $this->actorStoreFactory,
123 $this->blockRestrictionStoreFactory->getBlockRestrictionStore( $wikiId ),
125 $this->hookContainer,
126 $this->loadBalancerFactory->getMainLB( $wikiId ),
132 return $this->storeCache[$storeCacheKey];
if(!defined('MW_SETUP_CALLBACK'))