MediaWiki  1.23.1
LocalFileDeleteBatch Class Reference

Helper class for file deletion. More...

Collaboration diagram for LocalFileDeleteBatch:

Public Member Functions

 __construct (File $file, $reason='', $suppress=false)
 
 addCurrent ()
 
 addOld ( $oldName)
 
 addOlds ()
 Add the old versions of the image to the batch. More...
 
 doDBDeletes ()
 
 doDBInserts ()
 
 execute ()
 Run the transaction. More...
 
 getOldRels ()
 
 removeNonexistentFiles ( $batch)
 Removes non-existent files from a deletion batch. More...
 

Protected Member Functions

 getHashes ()
 

Private Attributes

array $archiveUrls = array()
 
array $deletionBatch
 Items to be processed in the deletion batch *. More...
 
LocalFile $file
 
string $reason
 
array $srcRels = array()
 
FileRepoStatus $status
 
bool $suppress
 Wether to suppress all suppressable fields when deleting *. More...
 

Detailed Description

Helper class for file deletion.

Definition at line 1870 of file LocalFile.php.

Constructor & Destructor Documentation

◆ __construct()

LocalFileDeleteBatch::__construct ( File  $file,
  $reason = '',
  $suppress = false 
)
Parameters
File$file
string$reason
bool$suppress

Definition at line 1890 of file LocalFile.php.

References $file, $reason, $suppress, and file.

Member Function Documentation

◆ addCurrent()

LocalFileDeleteBatch::addCurrent ( )

Definition at line 1897 of file LocalFile.php.

References file.

◆ addOld()

LocalFileDeleteBatch::addOld (   $oldName)
Parameters
string$oldName

Definition at line 1904 of file LocalFile.php.

References file.

Referenced by addOlds().

◆ addOlds()

LocalFileDeleteBatch::addOlds ( )

Add the old versions of the image to the batch.

Returns
array List of archive names from old versions

Definition at line 1913 of file LocalFile.php.

References addOld(), array(), as, and file.

◆ doDBDeletes()

LocalFileDeleteBatch::doDBDeletes ( )

Definition at line 2093 of file LocalFile.php.

References array(), file, getOldRels(), and list.

Referenced by execute().

◆ doDBInserts()

LocalFileDeleteBatch::doDBInserts ( )

◆ execute()

LocalFileDeleteBatch::execute ( )

◆ getHashes()

LocalFileDeleteBatch::getHashes ( )
protected
Returns
array

Definition at line 1950 of file LocalFile.php.

References $hash, $hashes, $name, $res, array(), as, file, getOldRels(), and list.

Referenced by execute().

◆ getOldRels()

LocalFileDeleteBatch::getOldRels ( )
Returns
array

Definition at line 1934 of file LocalFile.php.

References $srcRels, and array().

Referenced by doDBDeletes(), doDBInserts(), execute(), and getHashes().

◆ removeNonexistentFiles()

LocalFileDeleteBatch::removeNonexistentFiles (   $batch)

Removes non-existent files from a deletion batch.

Parameters
$batcharray
Returns
array

Definition at line 2195 of file LocalFile.php.

References $batch, $files, array(), as, file, and list.

Referenced by execute().

Member Data Documentation

◆ $archiveUrls

array LocalFileDeleteBatch::$archiveUrls = array()
private

Definition at line 1877 of file LocalFile.php.

◆ $deletionBatch

array LocalFileDeleteBatch::$deletionBatch
private

Items to be processed in the deletion batch *.

Definition at line 1879 of file LocalFile.php.

◆ $file

LocalFile LocalFileDeleteBatch::$file
private

Definition at line 1871 of file LocalFile.php.

Referenced by __construct().

◆ $reason

string LocalFileDeleteBatch::$reason
private

Definition at line 1873 of file LocalFile.php.

Referenced by __construct().

◆ $srcRels

array LocalFileDeleteBatch::$srcRels = array()
private

Definition at line 1875 of file LocalFile.php.

Referenced by getOldRels().

◆ $status

FileRepoStatus LocalFileDeleteBatch::$status
private

Definition at line 1883 of file LocalFile.php.

Referenced by execute().

◆ $suppress

bool LocalFileDeleteBatch::$suppress
private

Wether to suppress all suppressable fields when deleting *.

Definition at line 1881 of file LocalFile.php.

Referenced by __construct().


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