MediaWiki  REL1_22
ArchivedFile Class Reference

Class representing a row of the 'filearchive' table. More...

Collaboration diagram for ArchivedFile:

List of all members.

Public Member Functions

 __construct ($title, $id=0, $key= '')
 #@-
 exists ()
 getBits ()
 Return the bits of the image file, in bytes.
 getDescription ()
 Return upload description.
 getGroup ()
 Return the FileStore storage group.
 getHandler ()
 Get a MediaHandler instance for this file.
 getHeight ()
 Return the height of the image.
 getID ()
 getKey ()
 Return the FileStore key.
 getMediaType ()
 Return the type of the media in the file.
 getMetadata ()
 Get handler-specific metadata.
 getMimeType ()
 Returns the mime type of the file.
 getName ()
 Return the file name.
 getRawDescription ()
 Return upload description.
 getRawUser ()
 Return the user ID of the uploader.
 getRawUserText ()
 Return the user name of the uploader.
 getSha1 ()
 Get the SHA-1 base 36 hash of the file.
 getSize ()
 Return the size of the image file, in bytes.
 getStorageKey ()
 Return the FileStore key (overriding base File class)
 getTimestamp ()
 Return upload timestamp.
 getTitle ()
 Return the associated title object.
 getUser ()
 Return the user ID of the uploader.
 getUserText ()
 Return the user name of the uploader.
 getVisibility ()
 Returns the deletion bitfield.
 getWidth ()
 Return the width of the image.
 isDeleted ($field)
 for file or revision rows
 load ()
 Loads a file object from the filearchive table.
 loadFromRow ($row)
 Load ArchivedFile object fields from a DB row.
 pageCount ()
 Returns the number of pages of a multipage document, or false for documents which aren't multipage documents.
 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.

Static Public Member Functions

static newFromRow ($row)
 Loads a file object from the filearchive table.
static selectFields ()
 Fields in the filearchive table.

Public Attributes

 $archive_name
 $bits
 $dataLoaded
 $deleted
 $description
 $group
MediaHandler $handler
 $height
 $id
 #@+
 $key
 $media_type
 $metadata
 $mime
 $name
 $pageCount
 $sha1
 $size
 $timestamp
Title $title
 $user
 $user_text
 $width

Detailed Description

Class representing a row of the 'filearchive' table.

Definition at line 29 of file ArchivedFile.php.


Constructor & Destructor Documentation

ArchivedFile::__construct ( title,
id = 0,
key = '' 
)

#@-

Exceptions:
MWException
Parameters:
Title$title
int$id
string$key

Definition at line 69 of file ArchivedFile.php.


Member Function Documentation

Returns:
bool

Definition at line 263 of file ArchivedFile.php.

Return the bits of the image file, in bytes.

Returns:
int

Definition at line 333 of file ArchivedFile.php.

Return upload description.

Returns:
string

Definition at line 437 of file ArchivedFile.php.

Return the FileStore storage group.

Returns:
string

Definition at line 289 of file ArchivedFile.php.

Get a MediaHandler instance for this file.

Returns:
MediaHandler

Definition at line 351 of file ArchivedFile.php.

Return the height of the image.

Returns:
int

Definition at line 306 of file ArchivedFile.php.

Returns:
int

Definition at line 255 of file ArchivedFile.php.

Return the FileStore key.

Returns:
string

Definition at line 272 of file ArchivedFile.php.

Return the type of the media in the file.

Use the value returned by this function with the MEDIATYPE_xxx constants.

Returns:
string

Definition at line 378 of file ArchivedFile.php.

Get handler-specific metadata.

Returns:
string

Definition at line 315 of file ArchivedFile.php.

Returns the mime type of the file.

Returns:
string

Definition at line 342 of file ArchivedFile.php.

Return the file name.

Returns:
string

Definition at line 248 of file ArchivedFile.php.

Referenced by EraseArchivedFile\scrubVersion().

Return upload description.

Returns:
string

Definition at line 471 of file ArchivedFile.php.

Return the user ID of the uploader.

Returns:
int

Definition at line 451 of file ArchivedFile.php.

Return the user name of the uploader.

Returns:
string

Definition at line 461 of file ArchivedFile.php.

Get the SHA-1 base 36 hash of the file.

Returns:
string
Since:
1.21

Definition at line 399 of file ArchivedFile.php.

Return the size of the image file, in bytes.

Returns:
int

Definition at line 324 of file ArchivedFile.php.

Return the FileStore key (overriding base File class)

Returns:
string

Definition at line 281 of file ArchivedFile.php.

Referenced by EraseArchivedFile\scrubVersion().

Return upload timestamp.

Returns:
string

Definition at line 388 of file ArchivedFile.php.

Referenced by EraseArchivedFile\scrubVersion().

Return the associated title object.

Returns:
Title

Definition at line 239 of file ArchivedFile.php.

Return the user ID of the uploader.

Returns:
int

Definition at line 409 of file ArchivedFile.php.

Return the user name of the uploader.

Returns:
string

Definition at line 423 of file ArchivedFile.php.

Returns the deletion bitfield.

Returns:
int

Definition at line 480 of file ArchivedFile.php.

Return the width of the image.

Returns:
int

Definition at line 297 of file ArchivedFile.php.

for file or revision rows

Parameters:
$fieldInteger: one of DELETED_* bitfield constants
Returns:
bool

Definition at line 491 of file ArchivedFile.php.

Loads a file object from the filearchive table.

Exceptions:
MWException
Returns:
bool|null True on success or null

Definition at line 114 of file ArchivedFile.php.

Load ArchivedFile object fields from a DB row.

Parameters:
$rowObject database row
Since:
1.21

Definition at line 208 of file ArchivedFile.php.

static ArchivedFile::newFromRow ( row) [static]

Loads a file object from the filearchive table.

Parameters:
$row
Returns:
ArchivedFile

Definition at line 167 of file ArchivedFile.php.

Referenced by RevDel_ArchivedFileItem\__construct(), ApiQueryFilearchive\execute(), EraseArchivedFile\execute(), and EraseArchivedFile\scrubAllVersions().

Returns the number of pages of a multipage document, or false for documents which aren't multipage documents.

Definition at line 362 of file ArchivedFile.php.

static ArchivedFile::selectFields ( ) [static]

Fields in the filearchive table.

Returns:
array

Definition at line 177 of file ArchivedFile.php.

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.

Parameters:
$fieldInteger
$userUser object to check, or null to use $wgUser
Returns:
bool

Definition at line 503 of file ArchivedFile.php.


Member Data Documentation

ArchivedFile::$archive_name

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$bits

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$dataLoaded

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$deleted

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$description

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$group

Definition at line 33 of file ArchivedFile.php.

MediaHandler ArchivedFile::$handler

Definition at line 56 of file ArchivedFile.php.

ArchivedFile::$height

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$id

#@+

Access:
private

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$key

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$media_type

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$metadata

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$mime

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$name

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$pageCount

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$sha1

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$size

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$timestamp

Definition at line 33 of file ArchivedFile.php.

Title ArchivedFile::$title

Definition at line 59 of file ArchivedFile.php.

ArchivedFile::$user

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$user_text

Definition at line 33 of file ArchivedFile.php.

ArchivedFile::$width

Definition at line 33 of file ArchivedFile.php.


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