X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FStorage%2FBlobStore.php;h=78885db5fedc7ec0e9b234285263b03a8c3fa94d;hb=f5360c82b810a05b35e8de3f983ecf2deea1961a;hp=28caf3a412bf1495cdd77fb4089457e2f9eccf4f;hpb=3b7f4539639b3899e246e245df481882f81f9340;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/BlobStore.php b/includes/Storage/BlobStore.php index 28caf3a412..78885db5fe 100644 --- a/includes/Storage/BlobStore.php +++ b/includes/Storage/BlobStore.php @@ -22,6 +22,8 @@ namespace MediaWiki\Storage; +use StatusValue; + /** * Service for loading and storing data blobs. * @@ -95,6 +97,19 @@ interface BlobStore { */ public function getBlob( $blobAddress, $queryFlags = 0 ); + /** + * A batched version of BlobStore::getBlob. + * + * @param string[] $blobAddresses An array of blob addresses. + * @param int $queryFlags See IDBAccessObject. + * @throws BlobAccessException + * @return StatusValue A status with a map of blobAddress => binary blob data or null + * if fetching the blob has failed. Fetch failures errors are the + * warnings in the status object. + * @since 1.34 + */ + public function getBlobBatch( $blobAddresses, $queryFlags = 0 ); + /** * Stores an arbitrary blob of data and returns an address that can be used with * getBlob() to retrieve the same blob of data, @@ -110,4 +125,10 @@ interface BlobStore { */ public function storeBlob( $data, $hints = [] ); + /** + * Check if the blob metadata or backing blob data store is read-only + * + * @return bool + */ + public function isReadOnly(); }