MediaWiki
1.23.2
|
Class representing a row of the 'filearchive' table. More...
Public Member Functions | |
__construct ( $title, $id=0, $key='') | |
exists () | |
getBits () | |
Return the bits of the image file, in bytes. More... | |
getDescription () | |
Return upload description. More... | |
getGroup () | |
Return the FileStore storage group. More... | |
getHandler () | |
Get a MediaHandler instance for this file. More... | |
getHeight () | |
Return the height of the image. More... | |
getID () | |
getKey () | |
Return the FileStore key. More... | |
getMediaType () | |
Return the type of the media in the file. More... | |
getMetadata () | |
Get handler-specific metadata. More... | |
getMimeType () | |
Returns the mime type of the file. More... | |
getName () | |
Return the file name. More... | |
getRawDescription () | |
Return upload description. More... | |
getRawUser () | |
Return the user ID of the uploader. More... | |
getRawUserText () | |
Return the user name of the uploader. More... | |
getSha1 () | |
Get the SHA-1 base 36 hash of the file. More... | |
getSize () | |
Return the size of the image file, in bytes. More... | |
getStorageKey () | |
Return the FileStore key (overriding base File class) More... | |
getTimestamp () | |
Return upload timestamp. More... | |
getTitle () | |
Return the associated title object. More... | |
getUser ( $type='text') | |
Returns ID or name of user who uploaded the file. More... | |
getUserText () | |
Return the user name of the uploader. More... | |
getVisibility () | |
Returns the deletion bitfield. More... | |
getWidth () | |
Return the width of the image. More... | |
isDeleted ( $field) | |
for file or revision rows More... | |
load () | |
Loads a file object from the filearchive table. More... | |
loadFromRow ( $row) | |
Load ArchivedFile object fields from a DB row. More... | |
pageCount () | |
Returns the number of pages of a multipage document, or false for documents which aren't multipage documents. More... | |
userCan ( $field, User $user=null) | |
Determine if the current user is allowed to view a particular field of this FileStore image file, if it's marked as deleted. More... | |
Static Public Member Functions | |
static | newFromRow ( $row) |
Loads a file object from the filearchive table. More... | |
static | selectFields () |
Fields in the filearchive table. More... | |
Protected Attributes | |
MediaHandler | $handler |
Title | $title |
Private Attributes | |
string | $archive_name |
Original base filename *. More... | |
int | $bits |
size in bytes * More... | |
bool | $dataLoaded |
Whether or not all this has been loaded from the database (loadFromXxx) *. More... | |
int | $deleted |
Bitfield akin to rev_deleted *. More... | |
string | $description |
Upload description *. More... | |
string | $group |
FileStore storage group *. More... | |
int | $height |
Height *. More... | |
int | $id |
filearchive row ID * More... | |
string | $key |
FileStore SHA-1 key *. More... | |
string | $media_type |
Media type *. More... | |
string | $metadata |
Metadata string *. More... | |
string | $mime |
MIME type *. More... | |
string | $name |
File name *. More... | |
string | $pageCount |
Number of pages of a multipage document, or false for documents which aren't multipage documents. More... | |
string | $sha1 |
SHA-1 hash of file content *. More... | |
int | $size |
File size in bytes *. More... | |
string | $timestamp |
Time of upload *. More... | |
int | $user |
User ID of uploader *. More... | |
string | $user_text |
User name of uploader *. More... | |
int | $width |
Width *. More... | |
Class representing a row of the 'filearchive' table.
Definition at line 29 of file ArchivedFile.php.
ArchivedFile::__construct | ( | $title, | |
$id = 0 , |
|||
$key = '' |
|||
) |
MWException |
Title | $title | |
int | $id | |
string | $key |
Definition at line 82 of file ArchivedFile.php.
References $id, $key, $title, exists(), Title\getDBkey(), key, name, File\normalizeTitle(), title, and user.
ArchivedFile::exists | ( | ) |
Definition at line 277 of file ArchivedFile.php.
References load().
Referenced by __construct(), and load().
ArchivedFile::getBits | ( | ) |
Return the bits of the image file, in bytes.
Definition at line 353 of file ArchivedFile.php.
ArchivedFile::getDescription | ( | ) |
Return upload description.
Definition at line 474 of file ArchivedFile.php.
References $description, File\DELETED_COMMENT, isDeleted(), and load().
ArchivedFile::getGroup | ( | ) |
Return the FileStore storage group.
Definition at line 305 of file ArchivedFile.php.
References $group.
ArchivedFile::getHandler | ( | ) |
Get a MediaHandler instance for this file.
Definition at line 373 of file ArchivedFile.php.
References $handler, MediaHandler\getHandler(), and getMimeType().
Referenced by pageCount().
ArchivedFile::getHeight | ( | ) |
ArchivedFile::getID | ( | ) |
ArchivedFile::getKey | ( | ) |
Return the FileStore key.
Definition at line 287 of file ArchivedFile.php.
Referenced by getStorageKey().
ArchivedFile::getMediaType | ( | ) |
Return the type of the media in the file.
Use the value returned by this function with the MEDIATYPE_xxx constants.
Definition at line 402 of file ArchivedFile.php.
References $media_type, and load().
ArchivedFile::getMetadata | ( | ) |
ArchivedFile::getMimeType | ( | ) |
Returns the mime type of the file.
Definition at line 363 of file ArchivedFile.php.
Referenced by getHandler().
ArchivedFile::getName | ( | ) |
Return the file name.
Definition at line 261 of file ArchivedFile.php.
References $name.
Referenced by EraseArchivedFile\scrubVersion().
ArchivedFile::getRawDescription | ( | ) |
Return upload description.
Definition at line 510 of file ArchivedFile.php.
References $description, and load().
ArchivedFile::getRawUser | ( | ) |
ArchivedFile::getRawUserText | ( | ) |
Return the user name of the uploader.
Definition at line 499 of file ArchivedFile.php.
References $user_text, and load().
ArchivedFile::getSha1 | ( | ) |
Get the SHA-1 base 36 hash of the file.
Definition at line 425 of file ArchivedFile.php.
ArchivedFile::getSize | ( | ) |
Return the size of the image file, in bytes.
Definition at line 343 of file ArchivedFile.php.
ArchivedFile::getStorageKey | ( | ) |
Return the FileStore key (overriding base File class)
Definition at line 297 of file ArchivedFile.php.
References getKey().
Referenced by EraseArchivedFile\scrubVersion().
ArchivedFile::getTimestamp | ( | ) |
Return upload timestamp.
Definition at line 413 of file ArchivedFile.php.
References load(), TS_MW, and wfTimestamp().
Referenced by EraseArchivedFile\scrubVersion().
ArchivedFile::getTitle | ( | ) |
Return the associated title object.
Definition at line 252 of file ArchivedFile.php.
References $title.
ArchivedFile::getUser | ( | $type = 'text' | ) |
Returns ID or name of user who uploaded the file.
string | $type | 'text' or 'id' |
MWException |
Definition at line 441 of file ArchivedFile.php.
References $type, $user, $user_text, and load().
ArchivedFile::getUserText | ( | ) |
Return the user name of the uploader.
Definition at line 459 of file ArchivedFile.php.
References $user_text, File\DELETED_USER, isDeleted(), load(), and wfDeprecated().
ArchivedFile::getVisibility | ( | ) |
ArchivedFile::getWidth | ( | ) |
ArchivedFile::isDeleted | ( | $field | ) |
for file or revision rows
int | $field | One of DELETED_* bitfield constants |
Definition at line 532 of file ArchivedFile.php.
References load().
Referenced by getDescription(), and getUserText().
ArchivedFile::load | ( | ) |
Loads a file object from the filearchive table.
MWException |
Definition at line 127 of file ArchivedFile.php.
References $dbr, $group, $id, $key, array(), DB_SLAVE, exists(), key, loadFromRow(), NS_FILE, title, and wfGetDB().
Referenced by exists(), getBits(), getDescription(), getHeight(), getID(), getKey(), getMediaType(), getMetadata(), getMimeType(), getRawDescription(), getRawUser(), getRawUserText(), getSha1(), getSize(), getTimestamp(), getUser(), getUserText(), getVisibility(), getWidth(), isDeleted(), and userCan().
ArchivedFile::loadFromRow | ( | $row | ) |
Load ArchivedFile object fields from a DB row.
stdClass | $row | Object database row |
Definition at line 221 of file ArchivedFile.php.
References LocalRepo\getHashFromKey(), key, name, and user.
Referenced by load().
|
static |
Loads a file object from the filearchive table.
stdClass | $row |
Definition at line 179 of file ArchivedFile.php.
References $file, Title\makeTitle(), and NS_FILE.
Referenced by RevDel_ArchivedFileItem\__construct(), ApiQueryFilearchive\execute(), EraseArchivedFile\execute(), SpecialUndelete\formatFileRow(), and EraseArchivedFile\scrubAllVersions().
ArchivedFile::pageCount | ( | ) |
Returns the number of pages of a multipage document, or false for documents which aren't multipage documents.
Definition at line 385 of file ArchivedFile.php.
References $pageCount, and getHandler().
|
static |
Fields in the filearchive table.
Definition at line 190 of file ArchivedFile.php.
References array().
Referenced by RevDel_ArchivedFileList\doQuery(), ApiQueryFilearchive\execute(), LocalFileRestoreBatch\execute(), and PageArchive\listFiles().
ArchivedFile::userCan | ( | $field, | |
User | $user = null |
||
) |
Determine if the current user is allowed to view a particular field of this FileStore image file, if it's marked as deleted.
Definition at line 545 of file ArchivedFile.php.
References $user, load(), and Revision\userCanBitfield().
|
private |
Original base filename *.
Definition at line 70 of file ArchivedFile.php.
|
private |
|
private |
Whether or not all this has been loaded from the database (loadFromXxx) *.
Definition at line 60 of file ArchivedFile.php.
|
private |
Bitfield akin to rev_deleted *.
Definition at line 62 of file ArchivedFile.php.
Referenced by getVisibility().
|
private |
Upload description *.
Definition at line 52 of file ArchivedFile.php.
Referenced by getDescription(), and getRawDescription().
|
private |
FileStore storage group *.
Definition at line 34 of file ArchivedFile.php.
Referenced by getGroup(), and load().
|
protected |
|
private |
|
private |
filearchive row ID *
Definition at line 30 of file ArchivedFile.php.
Referenced by __construct(), getID(), and load().
|
private |
FileStore SHA-1 key *.
Definition at line 36 of file ArchivedFile.php.
Referenced by __construct(), getKey(), and load().
|
private |
|
private |
|
private |
|
private |
|
private |
Number of pages of a multipage document, or false for documents which aren't multipage documents.
Definition at line 68 of file ArchivedFile.php.
Referenced by pageCount().
|
private |
SHA-1 hash of file content *.
Definition at line 64 of file ArchivedFile.php.
Referenced by getSha1().
|
private |
|
private |
Time of upload *.
Definition at line 58 of file ArchivedFile.php.
|
protected |
|
private |
User ID of uploader *.
Definition at line 54 of file ArchivedFile.php.
Referenced by getRawUser(), getUser(), and userCan().
|
private |
User name of uploader *.
Definition at line 56 of file ArchivedFile.php.
Referenced by getRawUserText(), getUser(), and getUserText().
|
private |