ArchivedFile Class Reference

List of all members.

Public Member Functions

 ArchivedFile ($title, $id=0, $key='')
 #@-
 load ()
 Loads a file object from the filearchive table.
 getTitle ()
 Return the associated title object.
 getName ()
 Return the file name.
 getID ()
 exists ()
 getKey ()
 Return the FileStore key.
 getStorageKey ()
 Return the FileStore key (overriding base File class).
 getGroup ()
 Return the FileStore storage group.
 getWidth ()
 Return the width of the image.
 getHeight ()
 Return the height of the image.
 getMetadata ()
 Get handler-specific metadata.
 getSize ()
 Return the size of the image file, in bytes.
 getBits ()
 Return the bits of the image file, in bytes.
 getMimeType ()
 Returns the mime type of the file.
 getMediaType ()
 Return the type of the media in the file.
 getTimestamp ()
 Return upload timestamp.
 getUser ()
 Return the user ID of the uploader.
 getUserText ()
 Return the user name of the uploader.
 getDescription ()
 Return upload description.
 getRawUser ()
 Return the user ID of the uploader.
 getRawUserText ()
 Return the user name of the uploader.
 getRawDescription ()
 Return upload description.
 getVisibility ()
 Returns the deletion bitfield.
 isDeleted ($field)
 for file or revision rows
 userCan ($field)
 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

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


Detailed Description

Definition at line 6 of file ArchivedFile.php.


Member Function Documentation

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

#@-

Definition at line 32 of file ArchivedFile.php.

References $id, $key, $title, and exists().

Referenced by newFromRow().

ArchivedFile::exists (  ) 

Definition at line 198 of file ArchivedFile.php.

References load().

Referenced by ArchivedFile(), and load().

ArchivedFile::getBits (  ) 

Return the bits of the image file, in bytes.

Definition at line 260 of file ArchivedFile.php.

References load().

ArchivedFile::getDescription (  ) 

Return upload description.

Definition at line 317 of file ArchivedFile.php.

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

ArchivedFile::getGroup (  ) 

Return the FileStore storage group.

Definition at line 221 of file ArchivedFile.php.

ArchivedFile::getHeight (  ) 

Return the height of the image.

Definition at line 236 of file ArchivedFile.php.

References load().

ArchivedFile::getID (  ) 

Definition at line 193 of file ArchivedFile.php.

References load().

ArchivedFile::getKey (  ) 

Return the FileStore key.

Definition at line 206 of file ArchivedFile.php.

References load().

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

References load().

ArchivedFile::getMetadata (  ) 

Get handler-specific metadata.

Definition at line 244 of file ArchivedFile.php.

References load().

ArchivedFile::getMimeType (  ) 

Returns the mime type of the file.

Definition at line 268 of file ArchivedFile.php.

References load().

ArchivedFile::getName (  ) 

Return the file name.

Definition at line 189 of file ArchivedFile.php.

ArchivedFile::getRawDescription (  ) 

Return upload description.

Definition at line 345 of file ArchivedFile.php.

References load().

ArchivedFile::getRawUser (  ) 

Return the user ID of the uploader.

Definition at line 329 of file ArchivedFile.php.

References load().

ArchivedFile::getRawUserText (  ) 

Return the user name of the uploader.

Definition at line 337 of file ArchivedFile.php.

References load().

ArchivedFile::getSize (  ) 

Return the size of the image file, in bytes.

Definition at line 252 of file ArchivedFile.php.

References load().

ArchivedFile::getStorageKey (  ) 

Return the FileStore key (overriding base File class).

Definition at line 214 of file ArchivedFile.php.

References getKey().

ArchivedFile::getTimestamp (  ) 

Return upload timestamp.

Definition at line 285 of file ArchivedFile.php.

References load(), and wfTimestamp().

ArchivedFile::getTitle (  ) 

Return the associated title object.

Definition at line 182 of file ArchivedFile.php.

ArchivedFile::getUser (  ) 

Return the user ID of the uploader.

Definition at line 293 of file ArchivedFile.php.

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

ArchivedFile::getUserText (  ) 

Return the user name of the uploader.

Definition at line 305 of file ArchivedFile.php.

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

ArchivedFile::getVisibility (  ) 

Returns the deletion bitfield.

Returns:
int

Definition at line 354 of file ArchivedFile.php.

References load().

ArchivedFile::getWidth (  ) 

Return the width of the image.

Definition at line 228 of file ArchivedFile.php.

References load().

ArchivedFile::isDeleted ( field  ) 

for file or revision rows

Parameters:
$field Integer: one of DELETED_* bitfield constants
Returns:
bool

Definition at line 365 of file ArchivedFile.php.

References load().

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

ArchivedFile::load (  ) 

Loads a file object from the filearchive table.

Returns:
true on success or null

Definition at line 72 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().

static ArchivedFile::newFromRow ( row  )  [static]

Loads a file object from the filearchive table.

Returns:
ArchivedFile

Definition at line 155 of file ArchivedFile.php.

References ArchivedFile(), and Title::makeTitle().

Referenced by RevDel_ArchivedFileItem::__construct(), and UndeleteForm::formatFileRow().

ArchivedFile::userCan ( field  ) 

Determine if the current user is allowed to view a particular field of this FileStore image file, if it's marked as deleted.

Parameters:
$field Integer
Returns:
bool

Definition at line 376 of file ArchivedFile.php.

References load(), and Revision::userCanBitfield().


Member Data Documentation

ArchivedFile::$bits

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$dataLoaded

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$deleted

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$description

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$group

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$height

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$id

#@+

Access:
private

Definition at line 11 of file ArchivedFile.php.

Referenced by ArchivedFile().

ArchivedFile::$key

Definition at line 11 of file ArchivedFile.php.

Referenced by ArchivedFile().

ArchivedFile::$media_type

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$metadata

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$mime

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$name

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$size

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$timestamp

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$title

Definition at line 11 of file ArchivedFile.php.

Referenced by ArchivedFile().

ArchivedFile::$user

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$user_text

Definition at line 11 of file ArchivedFile.php.

ArchivedFile::$width

Definition at line 11 of file ArchivedFile.php.


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

Generated on Sat Apr 30 22:57:33 2011 for MediaWiki by  doxygen 1.5.9