X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStorage%2FBlobStoreFactory.php;h=c1371c93366ab93c3aef3a2e3fe89bc1c1abb474;hb=9c7f6734c397a954b8eaa5ec73876f2b4bf92afb;hp=82624467ae1e50db6b2eac9acdb4baee5af1ec53;hpb=5bcb9f59b0db5bfcef1b5f553447108189953ac6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/BlobStoreFactory.php b/includes/Storage/BlobStoreFactory.php index 82624467ae..c1371c9336 100644 --- a/includes/Storage/BlobStoreFactory.php +++ b/includes/Storage/BlobStoreFactory.php @@ -24,6 +24,7 @@ use Language; use MediaWiki\Config\ServiceOptions; use WANObjectCache; use Wikimedia\Rdbms\ILBFactory; +use ExternalStoreAccess; /** * Service for instantiating BlobStores @@ -39,6 +40,11 @@ class BlobStoreFactory { */ private $lbFactory; + /** + * @var ExternalStoreAccess + */ + private $extStoreAccess; + /** * @var WANObjectCache */ @@ -55,12 +61,10 @@ class BlobStoreFactory { private $contLang; /** - * TODO Make this a const when HHVM support is dropped (T192166) - * * @var array * @since 1.34 */ - public static $constructorOptions = [ + public const CONSTRUCTOR_OPTIONS = [ 'CompressRevisions', 'DefaultExternalStore', 'LegacyEncoding', @@ -69,13 +73,15 @@ class BlobStoreFactory { public function __construct( ILBFactory $lbFactory, + ExternalStoreAccess $extStoreAccess, WANObjectCache $cache, ServiceOptions $options, Language $contLang ) { - $options->assertRequiredOptions( self::$constructorOptions ); + $options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS ); $this->lbFactory = $lbFactory; + $this->extStoreAccess = $extStoreAccess; $this->cache = $cache; $this->options = $options; $this->contLang = $contLang; @@ -103,6 +109,7 @@ class BlobStoreFactory { $lb = $this->lbFactory->getMainLB( $dbDomain ); $store = new SqlBlobStore( $lb, + $this->extStoreAccess, $this->cache, $dbDomain );