Inherits FSRepo.
Inherited by ForeignDBRepo, and ForeignDBViaLBRepo.
Public Member Functions | |
newFileFromRow ($row) | |
newFromArchiveName ($title, $archiveName) | |
cleanupDeletedBatch ($storageKeys) | |
Delete files in the deleted directory if they are not referenced in the filearchive table. | |
checkRedirect ($title) | |
Checks if there is a redirect named as $title. | |
findBySha1 ($hash) | |
findFiles ($titles) | |
Public Attributes | |
$fileFactory = array( 'LocalFile', 'newFromTitle' ) | |
Factory functions for creating new files Override these in the base class. | |
$oldFileFactory = array( 'OldLocalFile', 'newFromTitle' ) | |
$fileFromRowFactory = array( 'LocalFile', 'newFromRow' ) | |
$oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' ) | |
Protected Member Functions | |
getArticleID ($title) | |
Function link Title::getArticleID(). |
This is the most commonly used repository class.
Definition at line 7 of file LocalRepo.php.
LocalRepo::checkRedirect | ( | $ | title | ) |
Checks if there is a redirect named as $title.
Reimplemented from FileRepo.
Definition at line 76 of file LocalRepo.php.
References $title, $wgMemc, FileRepo::getMemcKey(), and Title::makeTitle().
LocalRepo::cleanupDeletedBatch | ( | $ | 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.
Reimplemented from FileRepo.
Definition at line 34 of file LocalRepo.php.
References $dbw, $ext, $key, $path, $status, File::DELETED_FILE, FSRepo::getDeletedHashPath(), FileRepo::getMasterDB(), FSRepo::getZonePath(), FileRepo::newGood(), File::normalizeExtension(), and wfDebug().
LocalRepo::findBySha1 | ( | $ | hash | ) |
LocalRepo::findFiles | ( | $ | titles | ) |
LocalRepo::getArticleID | ( | $ | title | ) | [protected] |
Function link Title::getArticleID().
We can't say Title object, what database it should use, so we duplicate that function here.
Definition at line 120 of file LocalRepo.php.
LocalRepo::newFileFromRow | ( | $ | row | ) |
LocalRepo::newFromArchiveName | ( | $ | title, | |
$ | archiveName | |||
) |
LocalRepo::$fileFactory = array( 'LocalFile', 'newFromTitle' ) |
Factory functions for creating new files Override these in the base class.
Reimplemented from FSRepo.
Reimplemented in ForeignDBRepo, and ForeignDBViaLBRepo.
Definition at line 8 of file LocalRepo.php.
LocalRepo::$fileFromRowFactory = array( 'LocalFile', 'newFromRow' ) |
Reimplemented in ForeignDBRepo, and ForeignDBViaLBRepo.
Definition at line 10 of file LocalRepo.php.
LocalRepo::$oldFileFactory = array( 'OldLocalFile', 'newFromTitle' ) |
LocalRepo::$oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' ) |
Definition at line 11 of file LocalRepo.php.