MediaWiki master
LocalFileDeleteBatch Class Reference

Helper class for file deletion. More...

Public Member Functions

 __construct (File $file, UserIdentity $user, $reason='', $suppress=false)
 
 addCurrent ()
 
 addOld ( $oldName)
 
 addOlds ()
 Add the old versions of the image to the batch.
 
 execute ()
 Run the transaction.
 

Protected Member Functions

 doDBInserts ()
 
 getHashes (StatusValue $status)
 
 getOldRels ()
 
 removeNonexistentFiles ( $batch)
 Removes non-existent files from a deletion batch.
 

Detailed Description

Helper class for file deletion.

Access: internal

Definition at line 34 of file LocalFileDeleteBatch.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 62 of file LocalFileDeleteBatch.php.

Member Function Documentation

◆ addCurrent()

LocalFileDeleteBatch::addCurrent ( )

Definition at line 74 of file LocalFileDeleteBatch.php.

◆ addOld()

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

Definition at line 81 of file LocalFileDeleteBatch.php.

Referenced by addOlds().

◆ addOlds()

LocalFileDeleteBatch::addOlds ( )

Add the old versions of the image to the batch.

Returns
string[] List of archive names from old versions

Definition at line 90 of file LocalFileDeleteBatch.php.

References addOld().

◆ doDBInserts()

LocalFileDeleteBatch::doDBInserts ( )
protected

Definition at line 194 of file LocalFileDeleteBatch.php.

◆ execute()

LocalFileDeleteBatch::execute ( )

Run the transaction.

Returns
Status

Definition at line 327 of file LocalFileDeleteBatch.php.

References StatusValue\newGood().

◆ getHashes()

LocalFileDeleteBatch::getHashes ( StatusValue $status)
protected
Parameters
StatusValue$statusTo add error messages to
Returns
array

Definition at line 128 of file LocalFileDeleteBatch.php.

◆ getOldRels()

LocalFileDeleteBatch::getOldRels ( )
protected
Returns
array

Definition at line 111 of file LocalFileDeleteBatch.php.

◆ removeNonexistentFiles()

LocalFileDeleteBatch::removeNonexistentFiles ( $batch)
protected

Removes non-existent files from a deletion batch.

Parameters
array[]$batch
Returns
Status A good status with existing files in $batch as value, or a fatal status in case of I/O errors.

Definition at line 400 of file LocalFileDeleteBatch.php.


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