46 return $be->getFileContents( [
'src' => $url ] );
61 foreach (
$urls as $url ) {
64 $pathsByBackend[$be->getName()][] = $url;
68 foreach ( $pathsByBackend as $backendName => $paths ) {
70 $blobs += $be->getFileContentsMulti( [
'srcs' => $paths ] );
85 $wiki = $this->params[
'wiki'] ??
wfWikiID();
87 $url = $be->getContainerStoragePath(
'data' ) .
'/' .
rawurlencode( $wiki );
89 ?
"/{$rand[0]}/{$rand[1]}/{$rand[2]}/{$id}"
90 :
"/{$rand[0]}/{$rand[1]}/{$id}";
92 $be->prepare( [
'dir' =>
dirname( $url ),
'noAccess' => 1,
'noListing' => 1 ] );
93 if ( $be->create( [
'dst' => $url,
'content' =>
$data ] )->isOK() ) {
104 return $be ? $be->isReadOnly() :
false;
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
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
Accessable external objects in a particular storage medium.
File backend accessible external objects.
batchFetchFromURLs(array $urls)
Fetch data from given external store URLs.
isReadOnly( $backend)
Check if a given location is read-only.
store( $backend, $data)
Insert a data item into a given location.
fetchFromURL( $url)
The URL returned is of the form of the form mwstore://backend/container/wiki/id.
Class for a file system (FS) based file backend.
Base class for all file backend classes (including multi-write backends).
static newTimestampedUID128( $base=10)
Get a statistically unique 128-bit unsigned integer ID string.
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))