ForeignDBRepo Class Reference
[FileRepo]

A foreign repository with an accessible MediaWiki database. More...

Inherits LocalRepo.

List of all members.

Public Member Functions

 __construct ($info)
 getMasterDB ()
 getSlaveDB ()
 hasSharedCache ()
 store ($srcPath, $dstZone, $dstRel, $flags=0)
 Store a file to a given destination.
 publish ($srcPath, $dstRel, $archiveRel, $flags=0)
 Copy or move a file either from the local filesystem or from an mwrepo:// virtual URL, into this repository at the specified destination location.
 deleteBatch ($fileMap)
 Move a group of files to the deletion archive.

Public Attributes

 $dbType
 $dbServer
 $dbUser
 $dbPassword
 $dbName
 $dbFlags
 $tablePrefix
 $hasSharedCache
 $dbConn
 $fileFactory = array( 'ForeignDBFile', 'newFromTitle' )
 Factory functions for creating new files Override these in the base class.
 $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' )


Detailed Description

A foreign repository with an accessible MediaWiki database.

Definition at line 7 of file ForeignDBRepo.php.


Constructor & Destructor Documentation

ForeignDBRepo::__construct ( info  ) 

Reimplemented from FSRepo.

Definition at line 17 of file ForeignDBRepo.php.

References hasSharedCache().


Member Function Documentation

ForeignDBRepo::deleteBatch ( 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.

Parameters:
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.
Returns:
FileRepoStatus

Reimplemented from FSRepo.

Definition at line 53 of file ForeignDBRepo.php.

ForeignDBRepo::getMasterDB (  ) 

Reimplemented from FileRepo.

Definition at line 29 of file ForeignDBRepo.php.

Referenced by getSlaveDB().

ForeignDBRepo::getSlaveDB (  ) 

Reimplemented from FileRepo.

Definition at line 39 of file ForeignDBRepo.php.

References getMasterDB().

ForeignDBRepo::hasSharedCache (  ) 

Definition at line 43 of file ForeignDBRepo.php.

Referenced by __construct().

ForeignDBRepo::publish ( srcPath,
dstRel,
archiveRel,
flags = 0 
)

Copy or move a file either from the local filesystem or from an mwrepo:// virtual URL, into this repository at the specified destination location.

Returns a FileRepoStatus object. On success, the value contains "new" or "archived", to indicate whether the file was new with that name.

Parameters:
string $srcPath The source 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.
integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate that the source file should be deleted if possible

Reimplemented from FileRepo.

Definition at line 50 of file ForeignDBRepo.php.

ForeignDBRepo::store ( srcPath,
dstZone,
dstRel,
flags = 0 
)

Store a file to a given destination.

Parameters:
string $srcPath Source path or virtual URL
string $dstZone Destination zone
string $dstRel Destination relative path
integer $flags Bitwise combination of the following flags: self::DELETE_SOURCE Delete the source file after upload 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
Returns:
FileRepoStatus

Reimplemented from FileRepo.

Definition at line 47 of file ForeignDBRepo.php.


Member Data Documentation

ForeignDBRepo::$dbConn

Definition at line 13 of file ForeignDBRepo.php.

ForeignDBRepo::$dbFlags

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$dbName

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$dbPassword

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$dbServer

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$dbType

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$dbUser

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$fileFactory = array( 'ForeignDBFile', 'newFromTitle' )

Factory functions for creating new files Override these in the base class.

Reimplemented from LocalRepo.

Definition at line 14 of file ForeignDBRepo.php.

ForeignDBRepo::$fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' )

Reimplemented from LocalRepo.

Definition at line 15 of file ForeignDBRepo.php.

ForeignDBRepo::$hasSharedCache

Definition at line 9 of file ForeignDBRepo.php.

ForeignDBRepo::$tablePrefix

Definition at line 9 of file ForeignDBRepo.php.


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

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