MediaWiki  master
BlobStore.php
Go to the documentation of this file.
1 <?php
23 namespace MediaWiki\Storage;
24 
25 use StatusValue;
26 
35 interface BlobStore {
36 
42  const DESIGNATION_HINT = 'designation';
43 
48  const PAGE_HINT = 'page_id';
49 
54  const ROLE_HINT = 'role_name';
55 
60  const REVISION_HINT = 'rev_id';
61 
66  const PARENT_HINT = 'rev_parent_id';
67 
72  const SHA1_HINT = 'cont_sha1';
73 
78  const MODEL_HINT = 'cont_model';
79 
84  const FORMAT_HINT = 'cont_format';
85 
98  public function getBlob( $blobAddress, $queryFlags = 0 );
99 
111  public function getBlobBatch( $blobAddresses, $queryFlags = 0 );
112 
126  public function storeBlob( $data, $hints = [] );
127 
133  public function isReadOnly();
134 }
const MODEL_HINT
Hint key for use with storeBlob, indicating the model of the content encoded in the given blob...
Definition: BlobStore.php:78
storeBlob( $data, $hints=[])
Stores an arbitrary blob of data and returns an address that can be used with getBlob() to retrieve t...
const SHA1_HINT
Hint key for use with storeBlob, providing the SHA1 hash of the blob as passed to the method...
Definition: BlobStore.php:72
const PAGE_HINT
Hint key for use with storeBlob, indicating the page the blob is associated with. ...
Definition: BlobStore.php:48
getBlobBatch( $blobAddresses, $queryFlags=0)
A batched version of BlobStore::getBlob.
const PARENT_HINT
Hint key for use with storeBlob, indicating the parent revision of the revision the blob is associate...
Definition: BlobStore.php:66
const ROLE_HINT
Hint key for use with storeBlob, indicating the slot the blob is associated with. ...
Definition: BlobStore.php:54
getBlob( $blobAddress, $queryFlags=0)
Retrieve a blob, given an address.
isReadOnly()
Check if the blob metadata or backing blob data store is read-only.
const DESIGNATION_HINT
Hint key for use with storeBlob, indicating the general role the block takes in the application...
Definition: BlobStore.php:42
Service for loading and storing data blobs.
Definition: BlobStore.php:35
const REVISION_HINT
Hint key for use with storeBlob, indicating the revision the blob is associated with.
Definition: BlobStore.php:60
const FORMAT_HINT
Hint key for use with storeBlob, indicating the serialization format used to create the blob...
Definition: BlobStore.php:84