LocalRepo Class Reference
[FileRepo]

A repository that stores files in the local filesystem and registers them in the wiki's own database. More...

Inherits FSRepo.

Inherited by ForeignDBRepo, and ForeignDBViaLBRepo.

List of all members.

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().


Detailed Description

A repository that stores files in the local filesystem and registers them in the wiki's own database.

This is the most commonly used repository class.

Definition at line 7 of file LocalRepo.php.


Member Function Documentation

LocalRepo::checkRedirect ( title  ) 

Checks if there is a redirect named as $title.

Parameters:
Title $title Title of image

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.

Returns:
FileRepoStatus

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  ) 

Reimplemented from FileRepo.

Definition at line 139 of file LocalRepo.php.

LocalRepo::findFiles ( titles  ) 

Reimplemented from FileRepo.

Definition at line 157 of file LocalRepo.php.

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  ) 

Definition at line 13 of file LocalRepo.php.

References $row.

LocalRepo::newFromArchiveName ( title,
archiveName 
)

Definition at line 23 of file LocalRepo.php.

References $title.


Member Data Documentation

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' )

Reimplemented from FSRepo.

Definition at line 9 of file LocalRepo.php.

LocalRepo::$oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' )

Definition at line 11 of file LocalRepo.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:41 2009 for MediaWiki by  doxygen 1.5.9