MediaWiki REL1_33
BlobStoreFactory.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Storage;
22
23use Config;
24use Language;
27
36
40 private $lbFactory;
41
45 private $cache;
46
50 private $config;
51
55 private $contLang;
56
57 public function __construct(
60 Config $mainConfig,
62 ) {
63 $this->lbFactory = $lbFactory;
64 $this->cache = $cache;
65 $this->config = $mainConfig;
66 $this->contLang = $contLang;
67 }
68
76 public function newBlobStore( $wikiId = false ) {
77 return $this->newSqlBlobStore( $wikiId );
78 }
79
87 public function newSqlBlobStore( $wikiId = false ) {
88 $lb = $this->lbFactory->getMainLB( $wikiId );
89 $store = new SqlBlobStore(
90 $lb,
91 $this->cache,
92 $wikiId
93 );
94
95 $store->setCompressBlobs( $this->config->get( 'CompressRevisions' ) );
96 $store->setCacheExpiry( $this->config->get( 'RevisionCacheExpiry' ) );
97 $store->setUseExternalStore( $this->config->get( 'DefaultExternalStore' ) !== false );
98
99 if ( $this->config->get( 'LegacyEncoding' ) ) {
100 $store->setLegacyEncoding( $this->config->get( 'LegacyEncoding' ), $this->contLang );
101 }
102
103 return $store;
104 }
105
106}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Internationalisation code.
Definition Language.php:36
Service for instantiating BlobStores.
__construct(LBFactory $lbFactory, WANObjectCache $cache, Config $mainConfig, Language $contLang)
Service for storing and loading Content objects.
Multi-datacenter aware caching interface.
An interface for generating database load balancers.
Definition LBFactory.php:39
Interface for configuration instances.
Definition Config.php:28
you have access to all of the normal MediaWiki so you can get a DB use the cache