MediaWiki  REL1_19
ArchivedFile Class Reference

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

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.
 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.
 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.

Public Attributes

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

Detailed Description

Class representing a row of the 'filearchive' table.

Definition at line 14 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 55 of file ArchivedFile.php.

References $id, $key, $title, exists(), and File\normalizeTitle().

Here is the call graph for this function:


Member Function Documentation

Returns:
bool

Definition at line 238 of file ArchivedFile.php.

References load().

Referenced by __construct(), and load().

Here is the call graph for this function:

Here is the caller graph for this function:

Return the bits of the image file, in bytes.

Returns:
int

Definition at line 308 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return upload description.

Returns:
string

Definition at line 401 of file ArchivedFile.php.

References File\DELETED_COMMENT, isDeleted(), and load().

Here is the call graph for this function:

Return the FileStore storage group.

Returns:
string

Definition at line 264 of file ArchivedFile.php.

Get a MediaHandler instance for this file.

Returns:
MediaHandler

Definition at line 326 of file ArchivedFile.php.

References getMimeType().

Referenced by pageCount().

Here is the call graph for this function:

Here is the caller graph for this function:

Return the height of the image.

Returns:
int

Definition at line 281 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Returns:
int

Definition at line 230 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the FileStore key.

Returns:
string

Definition at line 247 of file ArchivedFile.php.

References load().

Referenced by getStorageKey().

Here is the call graph for this function:

Here is the caller graph for this function:

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 353 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Get handler-specific metadata.

Returns:
string

Definition at line 290 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Returns the mime type of the file.

Returns:
string

Definition at line 317 of file ArchivedFile.php.

References load().

Referenced by getHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

Return the file name.

Returns:
string

Definition at line 223 of file ArchivedFile.php.

Return upload description.

Returns:
string

Definition at line 435 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the user ID of the uploader.

Returns:
int

Definition at line 415 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the user name of the uploader.

Returns:
string

Definition at line 425 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the size of the image file, in bytes.

Returns:
int

Definition at line 299 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the FileStore key (overriding base File class)

Returns:
string

Definition at line 256 of file ArchivedFile.php.

References getKey().

Here is the call graph for this function:

Return upload timestamp.

Returns:
string

Definition at line 363 of file ArchivedFile.php.

References load(), and wfTimestamp().

Here is the call graph for this function:

Return the associated title object.

Returns:
Title

Definition at line 214 of file ArchivedFile.php.

Return the user ID of the uploader.

Returns:
int

Definition at line 373 of file ArchivedFile.php.

References File\DELETED_USER, isDeleted(), and load().

Here is the call graph for this function:

Return the user name of the uploader.

Returns:
string

Definition at line 387 of file ArchivedFile.php.

References File\DELETED_USER, isDeleted(), and load().

Here is the call graph for this function:

Returns the deletion bitfield.

Returns:
int

Definition at line 444 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

Return the width of the image.

Returns:
int

Definition at line 272 of file ArchivedFile.php.

References load().

Here is the call graph for this function:

for file or revision rows

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

Definition at line 455 of file ArchivedFile.php.

References load().

Referenced by getDescription(), getUser(), and getUserText().

Here is the call graph for this function:

Here is the caller graph for this function:

Loads a file object from the filearchive table.

Returns:
true on success or null

Definition at line 98 of file ArchivedFile.php.

References $dbr, $res, exists(), and wfGetDB().

Referenced by exists(), getBits(), getDescription(), getHeight(), getID(), getKey(), getMediaType(), getMetadata(), getMimeType(), getRawDescription(), getRawUser(), getRawUserText(), getSize(), getTimestamp(), getUser(), getUserText(), getVisibility(), getWidth(), isDeleted(), and userCan().

Here is the call graph for this function:

Here is the caller graph for this function:

static ArchivedFile::newFromRow ( row) [static]

Loads a file object from the filearchive table.

Parameters:
$row
Returns:
ArchivedFile

Definition at line 185 of file ArchivedFile.php.

References $file, and Title\makeTitle().

Referenced by RevDel_ArchivedFileItem\__construct(), ApiQueryFilearchive\execute(), and SpecialUndelete\formatFileRow().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 337 of file ArchivedFile.php.

References getHandler().

Here is the call graph for this function:

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 467 of file ArchivedFile.php.

References $user, load(), and Revision\userCanBitfield().

Here is the call graph for this function:


Member Data Documentation

ArchivedFile::$archive_name

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$bits

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$dataLoaded

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$deleted

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$description

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$group

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$handler

Definition at line 41 of file ArchivedFile.php.

ArchivedFile::$height

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$id

#@+

Access:
private

Definition at line 18 of file ArchivedFile.php.

Referenced by __construct().

ArchivedFile::$key

Definition at line 18 of file ArchivedFile.php.

Referenced by __construct().

ArchivedFile::$media_type

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$metadata

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$mime

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$name

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$pageCount

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$size

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$timestamp

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$title

Definition at line 45 of file ArchivedFile.php.

Referenced by __construct().

ArchivedFile::$user

Definition at line 18 of file ArchivedFile.php.

Referenced by userCan().

ArchivedFile::$user_text

Definition at line 18 of file ArchivedFile.php.

ArchivedFile::$width

Definition at line 18 of file ArchivedFile.php.


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