ForeignDBFile Class Reference
[FileRepo]

Inherits LocalFile.

List of all members.

Public Member Functions

 getCacheKey ()
 Get the memcached key.
 publish ($srcPath, $flags=0)
 Move or copy a file to its public location.
 recordUpload ($oldver, $desc, $license= '', $copyStatus= '', $source= '', $watch=false, $timestamp=false)
 Record a file upload in the upload log and the image table.
 restore ($versions=array(), $unsuppress=false)
 Restore all or specified deleted revisions to the given file.
 delete ($reason, $suppress=false)
 Delete all versions of the file.
 move ($target)
 getLinksTo inherited
 getDescriptionUrl ()
 isMultipage inherited
 getDescriptionText ()
 Get the HTML text of the description page This is not used by ImagePage for local files, since (among other things) it skips the parser cache.

Static Public Member Functions

static newFromTitle ($title, $repo, $unused=null)
 #@-
static newFromRow ($row, $repo)
 Create a ForeignDBFile from a title Do not call this except from inside a repo class.


Detailed Description

Definition at line 6 of file ForeignDBFile.php.


Member Function Documentation

ForeignDBFile::delete ( reason,
suppress = false 
)

Delete all versions of the file.

Moves the files into an archive directory (or deletes them) and removes the database rows.

Cache purging is done; logging is caller's responsibility.

Parameters:
$reason 
$suppress 
Returns:
FileRepoStatus object.

Reimplemented from LocalFile.

Definition at line 43 of file ForeignDBFile.php.

References File::readOnlyError().

ForeignDBFile::getCacheKey (  ) 

Get the memcached key.

Reimplemented from LocalFile.

Definition at line 22 of file ForeignDBFile.php.

References wfForeignMemcKey().

ForeignDBFile::getDescriptionText (  ) 

Get the HTML text of the description page This is not used by ImagePage for local files, since (among other things) it skips the parser cache.

Reimplemented from LocalFile.

Definition at line 55 of file ForeignDBFile.php.

ForeignDBFile::getDescriptionUrl (  ) 

isMultipage inherited

pageCount inherited scaleHeight inherited getImageSize inherited Get the URL of the file description page.

Reimplemented from LocalFile.

Definition at line 50 of file ForeignDBFile.php.

ForeignDBFile::move ( target  ) 

getLinksTo inherited

getExifData inherited isLocal inherited wasDeleted inherited Move file to the new title Move current, old version and all thumbnails to the new filename. Old file is deleted.

Cache purging is done; checks for validity and logging are caller's responsibility

Parameters:
$target Title New file name
Returns:
FileRepoStatus object.

Reimplemented from LocalFile.

Definition at line 46 of file ForeignDBFile.php.

References File::readOnlyError().

static ForeignDBFile::newFromRow ( row,
repo 
) [static]

Create a ForeignDBFile from a title Do not call this except from inside a repo class.

Reimplemented from LocalFile.

Definition at line 15 of file ForeignDBFile.php.

References $file, File::$repo, $row, File::$title, and Title::makeTitle().

static ForeignDBFile::newFromTitle ( title,
repo,
unused = null 
) [static]

#@-

Create a LocalFile from a title Do not call this except from inside a repo class.

Note: $unused param is only here to avoid an E_STRICT

Reimplemented from LocalFile.

Definition at line 7 of file ForeignDBFile.php.

References File::$repo, and File::$title.

ForeignDBFile::publish ( srcPath,
flags = 0 
)

Move or copy a file to its public location.

If a file exists at the destination, move it to an archive. Returns the archive name on success or an empty string if it was a new file, and a wikitext-formatted WikiError object on failure.

The archive name should be passed through to recordUpload for database registration.

Parameters:
string $sourcePath Local filesystem path to the source image
integer $flags A bitwise combination of: File::DELETE_SOURCE Delete the source file, i.e. move rather than copy
Returns:
FileRepoStatus object. On success, the value member contains the archive name, or an empty string if it was a new file.

Reimplemented from LocalFile.

Definition at line 32 of file ForeignDBFile.php.

References File::readOnlyError().

ForeignDBFile::recordUpload ( oldver,
desc,
license = '',
copyStatus = '',
source = '',
watch = false,
timestamp = false 
)

Record a file upload in the upload log and the image table.

Deprecated:
use upload()

Reimplemented from LocalFile.

Definition at line 36 of file ForeignDBFile.php.

References File::readOnlyError().

ForeignDBFile::restore ( versions = array(),
unsuppress = false 
)

Restore all or specified deleted revisions to the given file.

Permissions and logging are left to the caller.

May throw database exceptions on error.

Parameters:
$versions set of record ids of deleted items to restore, or empty to restore all revisions.
$unuppress 
Returns:
FileRepoStatus

Reimplemented from LocalFile.

Definition at line 40 of file ForeignDBFile.php.

References File::readOnlyError().


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