MediaWiki REL1_41
BlobStore.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Storage;
22
23use StatusValue;
24
33interface BlobStore {
34
40 public const DESIGNATION_HINT = 'designation';
41
46 public const PAGE_HINT = 'page_id';
47
52 public const ROLE_HINT = 'role_name';
53
58 public const REVISION_HINT = 'rev_id';
59
64 public const PARENT_HINT = 'rev_parent_id';
65
70 public const SHA1_HINT = 'cont_sha1';
71
76 public const MODEL_HINT = 'cont_model';
77
82 public const FORMAT_HINT = 'cont_format';
83
87 public const IMAGE_HINT = 'img_name';
88
101 public function getBlob( $blobAddress, $queryFlags = 0 );
102
114 public function getBlobBatch( $blobAddresses, $queryFlags = 0 );
115
129 public function storeBlob( $data, $hints = [] );
130
136 public function isReadOnly();
137}
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Service for loading and storing data blobs.
Definition BlobStore.php:33
isReadOnly()
Check if the blob metadata or backing blob data store is read-only.
getBlobBatch( $blobAddresses, $queryFlags=0)
A batched version of BlobStore::getBlob.
getBlob( $blobAddress, $queryFlags=0)
Retrieve a blob, given an address.
const PARENT_HINT
Hint key for use with storeBlob, indicating the parent revision of the revision the blob is associate...
Definition BlobStore.php:64
const DESIGNATION_HINT
Hint key for use with storeBlob, indicating the general role the block takes in the application.
Definition BlobStore.php:40
const PAGE_HINT
Hint key for use with storeBlob, indicating the page the blob is associated with.
Definition BlobStore.php:46
const ROLE_HINT
Hint key for use with storeBlob, indicating the slot the blob is associated with.
Definition BlobStore.php:52
const IMAGE_HINT
Hint key for an image name.
Definition BlobStore.php:87
const FORMAT_HINT
Hint key for use with storeBlob, indicating the serialization format used to create the blob,...
Definition BlobStore.php:82
const REVISION_HINT
Hint key for use with storeBlob, indicating the revision the blob is associated with.
Definition BlobStore.php:58
const SHA1_HINT
Hint key for use with storeBlob, providing the SHA1 hash of the blob as passed to the method.
Definition BlobStore.php:70
storeBlob( $data, $hints=[])
Stores an arbitrary blob of data and returns an address that can be used with getBlob() to retrieve t...
const MODEL_HINT
Hint key for use with storeBlob, indicating the model of the content encoded in the given blob.
Definition BlobStore.php:76