MediaWiki REL1_39
|
Local repository that stores files in the local filesystem and registers them in the wiki's own database. More...
Public Member Functions | |
__construct (array $info=null) | |
checkRedirect ( $title) | |
Checks if there is a redirect named as $title. | |
cleanupBatch (array $files, $flags=0) | |
Deletes a batch of files. | |
cleanupDeletedBatch (array $storageKeys) | |
Delete files in the deleted directory if they are not referenced in the filearchive table. | |
delete ( $srcRel, $archiveRel) | |
Move a file to the deletion archive. | |
deleteBatch (array $sourceDestPairs) | |
Move a group of files to the deletion archive. | |
findBySha1 ( $hash) | |
Get an array or iterator of file objects for files that have a given SHA-1 content hash. | |
findBySha1s (array $hashes) | |
Get an array of arrays or iterators of file objects for files that have the given SHA-1 content hashes. | |
findFiles (array $items, $flags=0) | |
Find many files at once. | |
findFilesByPrefix ( $prefix, $limit) | |
Return an array of files where the name starts with $prefix. | |
getBlobStore () | |
Get a BlobStore for storing and retrieving large metadata, or null if that can't be done. | |
getMasterDB () | |
Get a connection to the primary DB. | |
getPrimaryDB () | |
Get a connection to the primary DB. | |
getReplicaDB () | |
Get a connection to the replica DB. | |
getSharedCacheKey ( $kClassSuffix,... $components) | |
Get a global, repository-qualified, WAN cache key. | |
getSplitMetadataThreshold () | |
Get the threshold above which metadata items should be split into separate storage, or null if no splitting should be done. | |
invalidateImageRedirect ( $title) | |
Invalidates image redirect cache related to that image. | |
isJsonMetadataEnabled () | |
Returns true if files should store metadata in JSON format. | |
isMetadataReserializeEnabled () | |
isMetadataUpdateEnabled () | |
isSplitMetadataEnabled () | |
Returns true if files should split up large metadata, storing parts of it in the BlobStore. | |
newFileFromRow ( $row) | |
newFromArchiveName ( $title, $archiveName) | |
publish ( $src, $dstRel, $archiveRel, $flags=0, array $options=[]) | |
Copy or move a file either from a storage path, virtual URL, or file system path, into this repository at the specified destination location. | |
publishBatch (array $ntuples, $flags=0) | |
Publish a batch of files. | |
store ( $srcPath, $dstZone, $dstRel, $flags=0) | |
Store a file to a given destination. | |
storeBatch (array $triplets, $flags=0) | |
Store a batch of files. | |
Public Member Functions inherited from FileRepo | |
backendSupportsUnicodePaths () | |
canTransformLocally () | |
Returns true if the repository can transform files locally. | |
canTransformVia404 () | |
Returns true if the repository can transform files via a 404 handler. | |
cleanDir ( $dir) | |
Deletes a directory if empty. | |
concatenate (array $srcPaths, $dstPath, $flags=0) | |
Concatenate a list of temporary files into a target file location. | |
enumFiles ( $callback) | |
Call a callback function for every public regular file in the repository. | |
fileExists ( $file) | |
Checks existence of a file. | |
fileExistsBatch (array $files) | |
Checks existence of an array of files. | |
findFile ( $title, $options=[]) | |
Find an instance of the named file created at the specified time Returns false if the file does not exist. | |
findFileFromKey ( $sha1, $options=[]) | |
Find an instance of the file with this key, created at the specified time Returns false if the file does not exist. | |
freeTemp ( $virtualUrl) | |
Remove a temporary file or mark it for garbage collection. | |
getBackend () | |
Get the file backend instance. | |
getDeletedHashPath ( $key) | |
Get a relative path for a deletion archive key, e.g. | |
getDescriptionRenderUrl ( $name, $lang=null) | |
Get the URL of the content-only fragment of the description page. | |
getDescriptionStylesheetUrl () | |
Get the URL of the stylesheet to apply to description pages. | |
getDescriptionUrl ( $name) | |
Get the URL of an image description page. | |
getDisplayName () | |
Get the human-readable name of the repo. | |
getFileProps ( $virtualUrl) | |
Get properties of a file with a given virtual URL/storage path. | |
getFileSha1 ( $virtualUrl) | |
Get the sha1 (base 36) of a file with a given virtual URL/storage path. | |
getFileSize ( $virtualUrl) | |
Get the size of a file with a given virtual URL/storage path. | |
getFileTimestamp ( $virtualUrl) | |
Get the timestamp of a file with a given virtual URL/storage path. | |
getHashLevels () | |
Get the number of hash directory levels. | |
getHashPath ( $name) | |
Get a relative path including trailing slash, e.g. | |
getInfo () | |
Return information about the repository. | |
getLocalCacheKey ( $kClassSuffix,... $components) | |
Get a site-local, repository-qualified, WAN cache key. | |
getLocalCopy ( $virtualUrl) | |
Get a local FS copy of a file with a given virtual URL/storage path. | |
getLocalReference ( $virtualUrl) | |
Get a local FS file with a given virtual URL/storage path. | |
getName () | |
Get the name of this repository, as specified by $info['name]' to the constructor. | |
getNameFromTitle ( $title) | |
Get the name of a file from its title. | |
getReadOnlyReason () | |
Get an explanatory message if this repo is read-only. | |
getRootDirectory () | |
Get the public zone root storage directory of the repository. | |
getTempHashPath ( $suffix) | |
Get a relative path including trailing slash, e.g. | |
getTempRepo () | |
Get a temporary private FileRepo associated with this repo. | |
getThumbProxySecret () | |
Get the secret key for the proxied thumb service. | |
getThumbProxyUrl () | |
Get the URL thumb.php requests are being proxied to. | |
getThumbScriptUrl () | |
Get the URL of thumb.php. | |
getUploadStash (UserIdentity $user=null) | |
Get an UploadStash associated with this repo. | |
getVirtualUrl ( $suffix=false) | |
Get a URL referring to this repository, with the private mwrepo protocol. | |
getZonePath ( $zone) | |
Get the storage path corresponding to one of the zones. | |
getZoneUrl ( $zone, $ext=null) | |
Get the URL corresponding to one of the four basic zones. | |
hasSha1Storage () | |
Returns whether or not storage is SHA-1 based. | |
isLocal () | |
Returns true if this the local file repository. | |
makeUrl ( $query='', $entry='index') | |
Make an url to this repo. | |
nameForThumb ( $name) | |
Get the portion of the file that contains the origin file name. | |
newFatal ( $message,... $parameters) | |
Create a new fatal error. | |
newFile ( $title, $time=false) | |
Create a new File object from the local repository. | |
newGood ( $value=null) | |
Create a new good result. | |
paranoidClean ( $param) | |
Path disclosure protection function. | |
passThrough ( $param) | |
Path disclosure protection function. | |
quickCleanDir ( $dir) | |
Deletes a directory if empty. | |
quickImport ( $src, $dst, $options=null) | |
Import a file from the local file system into the repo. | |
quickImportBatch (array $triples) | |
Import a batch of files from the local file system into the repo. | |
quickPurge ( $path) | |
Purge a file from the repo. | |
quickPurgeBatch (array $paths) | |
Purge a batch of files from the repo. | |
resolveVirtualUrl ( $url) | |
Get the backend storage path corresponding to a virtual URL. | |
storeTemp ( $originalName, $srcPath) | |
Pick a random name in the temp zone and store a file to it. | |
streamFileWithStatus ( $virtualUrl, $headers=[], $optHeaders=[]) | |
Attempt to stream a file with the given virtual URL/storage path. | |
supportsSha1URLs () | |
Returns whether or not repo supports having originals SHA-1s in the thumb URLs. | |
validateFilename ( $filename) | |
Determine if a relative path is valid, i.e. | |
Static Public Member Functions | |
static | getHashFromKey ( $key) |
Gets the SHA1 hash from a storage key. | |
Static Public Member Functions inherited from FileRepo | |
static | isVirtualUrl ( $url) |
Determine if a string is an mwrepo:// URL. | |
Protected Member Functions | |
deletedFileHasKey ( $key, $lock=null) | |
Check if a deleted (filearchive) file has this sha1 key. | |
getDBFactory () | |
Get a callback to get a DB handle given an index (DB_REPLICA/DB_PRIMARY) | |
hasAcessibleSharedCache () | |
Check whether the repo has a shared cache, accessible from the current site context. | |
hiddenFileHasKey ( $key, $lock=null) | |
Check if a hidden (revision delete) file has this sha1 key. | |
skipWriteOperationIfSha1 ( $function, array $args) | |
Skips the write operation if storage is sha1-based, executes it normally otherwise. | |
Protected Member Functions inherited from FileRepo | |
assertWritableRepo () | |
Throw an exception if this repo is read-only by design. | |
enumFilesInStorage ( $callback) | |
Call a callback function for every public file in the repository. | |
getZoneLocation ( $zone) | |
The storage container and base path of a zone. | |
initDirectory ( $dir) | |
Creates a directory with the appropriate zone permissions. | |
initZones ( $doZones=[]) | |
Ensure that a single zone or list of zones is defined for usage. | |
resolveToStoragePathIfVirtual ( $path) | |
If a path is a virtual URL, resolve it to a storage path. | |
Protected Attributes | |
BlobStore | $blobStore |
string | $dbDomain |
DB domain of the repo wiki. | |
callable | $fileFactory = [ LocalFile::class, 'newFromTitle' ] |
callable | $fileFactoryKey = [ LocalFile::class, 'newFromKey' ] |
callable | $fileFromRowFactory = [ LocalFile::class, 'newFromRow' ] |
bool | $hasAccessibleSharedCache |
Whether shared cache keys are exposed/accessible. | |
callable | $oldFileFactory = [ OldLocalFile::class, 'newFromTitle' ] |
callable | $oldFileFactoryKey = [ OldLocalFile::class, 'newFromKey' ] |
callable | $oldFileFromRowFactory = [ OldLocalFile::class, 'newFromRow' ] |
bool | $reserializeMetadata = false |
int null | $splitMetadataThreshold = 1000 |
bool | $updateCompatibleMetadata = false |
bool | $useJsonMetadata = true |
bool | $useSplitMetadata = false |
Protected Attributes inherited from FileRepo | |
int | $abbrvThreshold |
File names over this size will use the short form of thumbnail names. | |
string | $articleUrl |
Equivalent to $wgArticlePath, e.g. | |
FileBackend | $backend |
int | $deletedHashLevels |
The number of directory levels for hash-based division of deleted files. | |
string | $descBaseUrl |
URL of image description pages, e.g. | |
bool | $disableLocalTransform = false |
Disable local image scaling. | |
null string | $favicon = null |
The URL to a favicon (optional, may be a server-local path URL). | |
callable | $fileFactory = [ UnregisteredLocalFile::class, 'newFromTitle' ] |
Override these in the base class. | |
callable false | $fileFactoryKey = false |
Override these in the base class. | |
int | $hashLevels |
The number of directory levels for hash-based division of files. | |
bool | $hasSha1Storage = false |
bool | $initialCapital |
Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE], determines whether filenames implicitly start with a capital letter. | |
bool | $isPrivate |
Whether all zones should be private (e.g. | |
callable false | $oldFileFactory = false |
Override these in the base class. | |
callable false | $oldFileFactoryKey = false |
Override these in the base class. | |
string | $pathDisclosureProtection = 'simple' |
May be 'paranoid' to remove all parameters from error messages, 'none' to leave the paths in unchanged, or 'simple' to replace paths with placeholders. | |
string | $scriptDirUrl |
URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g. | |
bool | $supportsSha1URLs = false |
string | $thumbProxySecret |
Secret key to pass as an X-Swift-Secret header to the proxied thumb service. | |
string | $thumbProxyUrl |
URL of where to proxy thumb.php requests to. | |
string | $thumbScriptUrl |
URL of thumb.php. | |
string false | $thumbUrl |
The base thumbnail URL. | |
bool | $transformVia404 |
Whether to skip media file transformation on parse and rely on a 404 handler instead. | |
string false | $url |
Public zone URL. | |
WANObjectCache | $wanCache |
array | $zones = [] |
Map of zones to config. | |
Additional Inherited Members | |
Public Attributes inherited from FileRepo | |
int | $descriptionCacheExpiry |
bool | $fetchDescription |
Whether to fetch commons image description pages and display them on the local wiki. | |
string | $name |
const | DELETE_SOURCE = 1 |
const | NAME_AND_TIME_ONLY = 1 |
const | OVERWRITE = 2 |
const | OVERWRITE_SAME = 4 |
const | SKIP_LOCKING = 8 |
Static Protected Member Functions inherited from FileRepo | |
static | getHashPathForLevel ( $name, $levels) |
Local repository that stores files in the local filesystem and registers them in the wiki's own database.
This is the most commonly used file repository class.
@method LocalFile|null newFile( $title, $time = false )
Definition at line 39 of file LocalRepo.php.
LocalRepo::__construct | ( | array | $info = null | ) |
array | null | $info |
MWException |
Reimplemented from FileRepo.
Definition at line 76 of file LocalRepo.php.
References getDBFactory(), and FileRepo\hasSha1Storage().
LocalRepo::checkRedirect | ( | $title | ) |
Checks if there is a redirect named as $title.
PageIdentity | LinkTarget | $title | Title of file |
Reimplemented from FileRepo.
Definition at line 237 of file LocalRepo.php.
References $dbr, $title, FileRepo\getLocalCacheKey(), getReplicaDB(), getSharedCacheKey(), and NS_FILE.
Referenced by findFiles().
LocalRepo::cleanupBatch | ( | array | $files, |
$flags = 0 ) |
Deletes a batch of files.
Each file can be a (zone, rel) pair, virtual url, storage path. It will try to delete each file, but ignores any errors that may occur.
string[] | $files | List of files to delete |
int | $flags | Bitwise combination of the following flags: self::SKIP_LOCKING Skip any file locking when doing the deletions |
Reimplemented from FileRepo.
Definition at line 594 of file LocalRepo.php.
References skipWriteOperationIfSha1().
LocalRepo::cleanupDeletedBatch | ( | array | $storageKeys | ) |
Delete files in the deleted directory if they are not referenced in the filearchive table.
This needs to be done in the repo because it needs to interleave database locks with file operations, which is potentially a remote operation.
string[] | $storageKeys |
Reimplemented from FileRepo.
Definition at line 142 of file LocalRepo.php.
References FileRepo\$backend, $path, deletedFileHasKey(), FileBackend\doOperation(), FileRepo\getDeletedHashPath(), getPrimaryDB(), FileRepo\getZonePath(), FileRepo\hasSha1Storage(), hiddenFileHasKey(), FileRepo\newGood(), and wfDebug().
LocalRepo::delete | ( | $srcRel, | |
$archiveRel ) |
Move a file to the deletion archive.
If no valid deletion archive exists, this may either delete the file or throw an exception, depending on the preference of the repository
mixed | $srcRel | Relative path for the file to be deleted |
mixed | $archiveRel | Relative path for the archive location. Relative to a private archive directory. |
Reimplemented from FileRepo.
Definition at line 612 of file LocalRepo.php.
References skipWriteOperationIfSha1().
LocalRepo::deleteBatch | ( | array | $sourceDestPairs | ) |
Move a group of files to the deletion archive.
If no valid deletion archive is configured, this may either delete the file or throw an exception, depending on the preference of the repository.
The overwrite policy is determined by the repository – currently LocalRepo assumes a naming scheme in the deleted zone based on content hash, as opposed to the public zone which is assumed to be unique.
array | $sourceDestPairs | Array of source/destination pairs. Each element is a two-element array containing the source file path relative to the public root in the first element, and the archive file path relative to the deleted zone root in the second element. |
MWException |
Reimplemented from FileRepo.
Definition at line 616 of file LocalRepo.php.
References skipWriteOperationIfSha1().
|
protected |
Check if a deleted (filearchive) file has this sha1 key.
string | $key | File storage key (base-36 sha1 key with file extension) |
string | null | $lock | Use "lock" to lock the row via FOR UPDATE |
Definition at line 185 of file LocalRepo.php.
References getPrimaryDB().
Referenced by cleanupDeletedBatch().
LocalRepo::findBySha1 | ( | $hash | ) |
Get an array or iterator of file objects for files that have a given SHA-1 content hash.
string | $hash | A sha1 hash to look for |
Reimplemented from FileRepo.
Definition at line 423 of file LocalRepo.php.
References $dbr, $res, getReplicaDB(), and newFileFromRow().
LocalRepo::findBySha1s | ( | array | $hashes | ) |
Get an array of arrays or iterators of file objects for files that have the given SHA-1 content hashes.
Overrides generic implementation in FileRepo for performance reason
string[] | $hashes | An array of hashes |
Reimplemented from FileRepo.
Definition at line 453 of file LocalRepo.php.
References $dbr, $file, $hashes, $res, getReplicaDB(), and newFileFromRow().
LocalRepo::findFiles | ( | array | $items, |
$flags = 0 ) |
Find many files at once.
array | $items | An array of titles, or an array of findFile() options with the "title" option giving the title. Example: |
$findItem = [ 'title' => $title, 'private' => true ]; $findBatch = [ $findItem ]; $repo->findFiles( $findBatch );
No title should appear in $items twice, as the result use titles as keys
int | $flags | Supports:
|
Reimplemented from FileRepo.
Definition at line 284 of file LocalRepo.php.
References $dbr, $file, $res, $title, checkRedirect(), FileRepo\getInfo(), FileRepo\getNameFromTitle(), getReplicaDB(), LIST_AND, LIST_OR, FileRepo\NAME_AND_TIME_ONLY, FileRepo\newFile(), newFileFromRow(), and NS_FILE.
LocalRepo::findFilesByPrefix | ( | $prefix, | |
$limit ) |
Return an array of files where the name starts with $prefix.
string | $prefix | The prefix to search for |
int | $limit | The maximum amount of files to return |
Reimplemented from FileRepo.
Definition at line 486 of file LocalRepo.php.
References $dbr, $res, getReplicaDB(), and newFileFromRow().
LocalRepo::getBlobStore | ( | ) |
Get a BlobStore for storing and retrieving large metadata, or null if that can't be done.
Reimplemented in ForeignDBRepo.
Definition at line 685 of file LocalRepo.php.
|
protected |
Get a callback to get a DB handle given an index (DB_REPLICA/DB_PRIMARY)
Reimplemented in ForeignDBRepo, and ForeignDBViaLBRepo.
Definition at line 541 of file LocalRepo.php.
References wfGetDB().
Referenced by __construct().
|
static |
Gets the SHA1 hash from a storage key.
string | $key |
Definition at line 223 of file LocalRepo.php.
LocalRepo::getMasterDB | ( | ) |
Get a connection to the primary DB.
Reimplemented in ForeignDBViaLBRepo.
Definition at line 532 of file LocalRepo.php.
References getPrimaryDB(), and wfDeprecated().
LocalRepo::getPrimaryDB | ( | ) |
Get a connection to the primary DB.
Reimplemented in ForeignDBRepo, and ForeignDBViaLBRepo.
Definition at line 523 of file LocalRepo.php.
References DB_PRIMARY, and wfGetDB().
Referenced by cleanupDeletedBatch(), deletedFileHasKey(), getMasterDB(), hiddenFileHasKey(), and invalidateImageRedirect().
LocalRepo::getReplicaDB | ( | ) |
Get a connection to the replica DB.
Reimplemented in ForeignDBRepo, and ForeignDBViaLBRepo.
Definition at line 514 of file LocalRepo.php.
References DB_REPLICA, and wfGetDB().
Referenced by FindOrphanedFiles\checkFiles(), checkRedirect(), findBySha1(), findBySha1s(), findFiles(), findFilesByPrefix(), and PurgeChangedFiles\purgeFromArchiveTable().
LocalRepo::getSharedCacheKey | ( | $kClassSuffix, | |
$components ) |
Get a global, repository-qualified, WAN cache key.
This might be called from either the site context of the wiki that owns the repo or the site context of another wiki that simply has access to the repo. This returns false if the repository's cache is not accessible from the current site context.
string | $kClassSuffix | Key collection name suffix (added to this repo class) |
mixed | ...$components Additional key components |
Reimplemented from FileRepo.
Definition at line 557 of file LocalRepo.php.
References hasAcessibleSharedCache().
Referenced by checkRedirect(), and invalidateImageRedirect().
LocalRepo::getSplitMetadataThreshold | ( | ) |
Get the threshold above which metadata items should be split into separate storage, or null if no splitting should be done.
Definition at line 667 of file LocalRepo.php.
|
protected |
Check whether the repo has a shared cache, accessible from the current site context.
Definition at line 553 of file LocalRepo.php.
Referenced by getSharedCacheKey().
|
protected |
Check if a hidden (revision delete) file has this sha1 key.
string | $key | File storage key (base-36 sha1 key with file extension) |
string | null | $lock | Use "lock" to lock the row via FOR UPDATE |
Definition at line 201 of file LocalRepo.php.
References $ext, and getPrimaryDB().
Referenced by cleanupDeletedBatch().
LocalRepo::invalidateImageRedirect | ( | $title | ) |
Invalidates image redirect cache related to that image.
PageIdentity | LinkTarget | $title | Title of page |
Reimplemented from FileRepo.
Definition at line 574 of file LocalRepo.php.
References $title, getPrimaryDB(), and getSharedCacheKey().
LocalRepo::isJsonMetadataEnabled | ( | ) |
Returns true if files should store metadata in JSON format.
This requires metadata from all handlers to be JSON-serializable.
To avoid breaking existing metadata, reading JSON metadata is always enabled regardless of this setting.
Definition at line 647 of file LocalRepo.php.
Referenced by isSplitMetadataEnabled().
LocalRepo::isMetadataReserializeEnabled | ( | ) |
Definition at line 675 of file LocalRepo.php.
LocalRepo::isMetadataUpdateEnabled | ( | ) |
Definition at line 671 of file LocalRepo.php.
LocalRepo::isSplitMetadataEnabled | ( | ) |
Returns true if files should split up large metadata, storing parts of it in the BlobStore.
Definition at line 657 of file LocalRepo.php.
References isJsonMetadataEnabled().
LocalRepo::newFileFromRow | ( | $row | ) |
MWException |
stdClass | $row |
Definition at line 112 of file LocalRepo.php.
Referenced by findBySha1(), findBySha1s(), findFiles(), and findFilesByPrefix().
LocalRepo::newFromArchiveName | ( | $title, | |
$archiveName ) |
PageIdentity | LinkTarget | string | $title | |
string | $archiveName |
Definition at line 127 of file LocalRepo.php.
References $title.
Referenced by FindOrphanedFiles\checkFiles(), and PurgeChangedFiles\purgeFromArchiveTable().
LocalRepo::publish | ( | $src, | |
$dstRel, | |||
$archiveRel, | |||
$flags = 0, | |||
array | $options = [] ) |
Copy or move a file either from a storage path, virtual URL, or file system path, into this repository at the specified destination location.
Returns a Status object. On success, the value contains "new" or "archived", to indicate whether the file was new with that name.
Using FSFile/TempFSFile can improve performance via caching. Using TempFSFile can further improve performance by signalling that it is safe to touch the source file or write extended attribute metadata to it directly.
Options to $options include:
string | FSFile | $src | The source file system path, storage path, or URL |
string | $dstRel | The destination relative path |
string | $archiveRel | The relative path where the existing file is to be archived, if there is one. Relative to the public zone root. |
int | $flags | Bitfield, may be FileRepo::DELETE_SOURCE to indicate that the source file should be deleted if possible |
array | $options | Optional additional parameters |
Reimplemented from FileRepo.
Definition at line 598 of file LocalRepo.php.
References skipWriteOperationIfSha1().
LocalRepo::publishBatch | ( | array | $ntuples, |
$flags = 0 ) |
Publish a batch of files.
array | $ntuples | (source, dest, archive) triplets or (source, dest, archive, options) 4-tuples as per publish(). |
int | $flags | Bitfield, may be FileRepo::DELETE_SOURCE to indicate that the source files should be deleted if possible |
MWException |
Reimplemented from FileRepo.
Definition at line 608 of file LocalRepo.php.
References skipWriteOperationIfSha1().
|
protected |
Skips the write operation if storage is sha1-based, executes it normally otherwise.
string | $function | |
array | $args |
Definition at line 627 of file LocalRepo.php.
References $args, FileRepo\assertWritableRepo(), FileRepo\hasSha1Storage(), and wfDebug().
Referenced by cleanupBatch(), delete(), deleteBatch(), publish(), publishBatch(), store(), and storeBatch().
LocalRepo::store | ( | $srcPath, | |
$dstZone, | |||
$dstRel, | |||
$flags = 0 ) |
Store a file to a given destination.
Using FSFile/TempFSFile can improve performance via caching. Using TempFSFile can further improve performance by signalling that it is safe to touch the source file or write extended attribute metadata to it directly.
string | FSFile | $srcPath | Source file system path, storage path, or virtual URL |
string | $dstZone | Destination zone |
string | $dstRel | Destination relative path |
int | $flags | Bitwise combination of the following flags: self::OVERWRITE Overwrite an existing destination file instead of failing self::OVERWRITE_SAME Overwrite the file if the destination exists and has the same contents as the source self::SKIP_LOCKING Skip any file locking when doing the store |
Reimplemented from FileRepo.
Definition at line 586 of file LocalRepo.php.
References skipWriteOperationIfSha1().
LocalRepo::storeBatch | ( | array | $triplets, |
$flags = 0 ) |
Store a batch of files.
array | $triplets | (src, dest zone, dest rel) triplets as per store() |
int | $flags | Bitwise combination of the following flags: self::OVERWRITE Overwrite an existing destination file instead of failing self::OVERWRITE_SAME Overwrite the file if the destination exists and has the same contents as the source self::SKIP_LOCKING Skip any file locking when doing the store |
MWException |
Reimplemented from FileRepo.
Definition at line 590 of file LocalRepo.php.
References skipWriteOperationIfSha1().
|
protected |
Definition at line 59 of file LocalRepo.php.
|
protected |
DB domain of the repo wiki.
Definition at line 54 of file LocalRepo.php.
Referenced by ForeignDBRepo\__construct().
|
protected |
Definition at line 41 of file LocalRepo.php.
|
protected |
Definition at line 43 of file LocalRepo.php.
|
protected |
Definition at line 45 of file LocalRepo.php.
|
protected |
Whether shared cache keys are exposed/accessible.
Definition at line 56 of file LocalRepo.php.
|
protected |
Definition at line 49 of file LocalRepo.php.
|
protected |
Definition at line 51 of file LocalRepo.php.
|
protected |
Definition at line 47 of file LocalRepo.php.
|
protected |
Definition at line 74 of file LocalRepo.php.
|
protected |
Definition at line 68 of file LocalRepo.php.
|
protected |
Definition at line 71 of file LocalRepo.php.
|
protected |
Definition at line 62 of file LocalRepo.php.
|
protected |
Definition at line 65 of file LocalRepo.php.