assertRequiredOptions( self::$constructorOptions ); $this->lbFactory = $lbFactory; $this->cache = $cache; $this->options = $options; $this->contLang = $contLang; } /** * @since 1.31 * * @param bool|string $wikiId The ID of the target wiki database. Use false for the local wiki. * * @return BlobStore */ public function newBlobStore( $wikiId = false ) { return $this->newSqlBlobStore( $wikiId ); } /** * @internal Please call newBlobStore and use the BlobStore interface. * * @param bool|string $wikiId The ID of the target wiki database. Use false for the local wiki. * * @return SqlBlobStore */ public function newSqlBlobStore( $wikiId = false ) { $lb = $this->lbFactory->getMainLB( $wikiId ); $store = new SqlBlobStore( $lb, $this->cache, $wikiId ); $store->setCompressBlobs( $this->options->get( 'CompressRevisions' ) ); $store->setCacheExpiry( $this->options->get( 'RevisionCacheExpiry' ) ); $store->setUseExternalStore( $this->options->get( 'DefaultExternalStore' ) !== false ); if ( $this->options->get( 'LegacyEncoding' ) ) { $store->setLegacyEncoding( $this->options->get( 'LegacyEncoding' ), $this->contLang ); } return $store; } }