MediaWiki REL1_28
WikiRevision Class Reference

Represents a revision, log entry or upload during the import process. More...

Collaboration diagram for WikiRevision:

Public Member Functions

 __construct (Config $config)
 
 downloadSource ()
 
 getAction ()
 
 getArchiveName ()
 
 getComment ()
 
 getContent ()
 
 getContentHandler ()
 
 getFilename ()
 
 getFileSrc ()
 
 getFormat ()
 
 getID ()
 
 getMinor ()
 
 getModel ()
 
 getParams ()
 
 getSha1 ()
 
 getSize ()
 
 getSrc ()
 
 getText ()
 
 getTimestamp ()
 
 getTitle ()
 
 getType ()
 
 getUser ()
 
 getUserObj ()
 
 importLogItem ()
 
 importOldRevision ()
 
 importUpload ()
 
 isTempSrc ()
 
 setAction ( $action)
 
 setArchiveName ( $archiveName)
 
 setComment ( $text)
 
 setFilename ( $filename)
 
 setFileSrc ( $src, $isTemp)
 
 setFormat ( $format)
 
 setID ( $id)
 
 setMinor ( $minor)
 
 setModel ( $model)
 
 setNoUpdates ( $noupdates)
 
 setParams ( $params)
 
 setSha1Base36 ( $sha1base36)
 
 setSize ( $size)
 
 setSrc ( $src)
 
 setText ( $text)
 
 setTimestamp ( $ts)
 
 setTitle ( $title)
 
 setType ( $type)
 
 setUserIP ( $ip)
 
 setUsername ( $user)
 
 setUserObj ( $user)
 

Public Attributes

string $action = ""
 
string $archiveName = ''
 
string $comment = ""
 
Content $content = null
 
 $fileIsTemp
 
string $fileSrc = ''
 
string $format = null
 
int $id = 0
 
 $importer = null
 
bool $isTemp = false
 
bool $minor = false
 
string $model = null
 
string $params = ""
 
bool string $sha1base36 = false
 
string $text = ""
 
string $timestamp = "20010115000000"
 
Title $title = null
 
string $type = ""
 
int $user = 0
 
string $user_text = ""
 
User $userObj = null
 

Protected Attributes

ContentHandler $contentHandler = null
 
 $filename
 
int $size
 
mixed $src
 

Private Attributes

 $config
 
bool $mNoUpdates = false
 

Detailed Description

Represents a revision, log entry or upload during the import process.

This class sticks closely to the structure of the XML dump.

Definition at line 33 of file WikiRevision.php.

Constructor & Destructor Documentation

◆ __construct()

WikiRevision::__construct ( Config  $config)

Definition at line 119 of file WikiRevision.php.

References $config.

Member Function Documentation

◆ downloadSource()

WikiRevision::downloadSource ( )
Returns
bool|string

Definition at line 691 of file WikiRevision.php.

References $src, getSrc(), wfDebug(), and wfTempDir().

Referenced by importUpload().

◆ getAction()

WikiRevision::getAction ( )
Returns
string

Definition at line 448 of file WikiRevision.php.

References $action.

Referenced by importLogItem().

◆ getArchiveName()

WikiRevision::getArchiveName ( )
Returns
string

Definition at line 427 of file WikiRevision.php.

References $archiveName.

Referenced by importUpload().

◆ getComment()

WikiRevision::getComment ( )
Returns
string

Definition at line 375 of file WikiRevision.php.

References $comment.

Referenced by importLogItem(), importOldRevision(), and importUpload().

◆ getContent()

WikiRevision::getContent ( )
Returns
Content

Definition at line 341 of file WikiRevision.php.

References $content, $handler, content, getContentHandler(), getFormat(), and text.

Referenced by importOldRevision().

◆ getContentHandler()

WikiRevision::getContentHandler ( )
Returns
ContentHandler

Definition at line 330 of file WikiRevision.php.

References $contentHandler, ContentHandler\getForModelID(), and getModel().

Referenced by getContent(), and getFormat().

◆ getFilename()

WikiRevision::getFilename ( )
Returns
mixed

Definition at line 420 of file WikiRevision.php.

References $filename.

◆ getFileSrc()

WikiRevision::getFileSrc ( )
Returns
string

Definition at line 406 of file WikiRevision.php.

References $fileSrc.

Referenced by importUpload().

◆ getFormat()

WikiRevision::getFormat ( )
Returns
string

Definition at line 364 of file WikiRevision.php.

References $format, format, and getContentHandler().

Referenced by getContent(), and importOldRevision().

◆ getID()

WikiRevision::getID ( )
Returns
int

Definition at line 291 of file WikiRevision.php.

References $id.

◆ getMinor()

WikiRevision::getMinor ( )
Returns
bool

Definition at line 382 of file WikiRevision.php.

References $minor.

◆ getModel()

WikiRevision::getModel ( )
Returns
string

Definition at line 353 of file WikiRevision.php.

References $model, and getTitle().

Referenced by getContentHandler(), and importOldRevision().

◆ getParams()

WikiRevision::getParams ( )
Returns
string

Definition at line 455 of file WikiRevision.php.

References $params.

◆ getSha1()

WikiRevision::getSha1 ( )
Returns
bool|string

Definition at line 396 of file WikiRevision.php.

Referenced by importUpload().

◆ getSize()

WikiRevision::getSize ( )
Returns
mixed

Definition at line 434 of file WikiRevision.php.

References $size.

◆ getSrc()

WikiRevision::getSrc ( )
Returns
mixed

Definition at line 389 of file WikiRevision.php.

References $src.

Referenced by downloadSource().

◆ getText()

WikiRevision::getText ( )
Returns
string
Deprecated:
Since 1.21, use getContent() instead.

Definition at line 321 of file WikiRevision.php.

References $text, and wfDeprecated().

◆ getTimestamp()

WikiRevision::getTimestamp ( )
Returns
string

Definition at line 298 of file WikiRevision.php.

References $timestamp.

Referenced by importUpload().

◆ getTitle()

WikiRevision::getTitle ( )
Returns
Title

Definition at line 284 of file WikiRevision.php.

References $title.

Referenced by getModel(), importLogItem(), and importUpload().

◆ getType()

WikiRevision::getType ( )
Returns
string

Definition at line 441 of file WikiRevision.php.

References $type.

Referenced by importLogItem().

◆ getUser()

WikiRevision::getUser ( )
Returns
string

Definition at line 305 of file WikiRevision.php.

References $user_text.

Referenced by importLogItem(), importOldRevision(), and importUpload().

◆ getUserObj()

WikiRevision::getUserObj ( )
Returns
User

Definition at line 312 of file WikiRevision.php.

References $userObj.

Referenced by importLogItem(), importOldRevision(), and importUpload().

◆ importLogItem()

WikiRevision::importLogItem ( )

◆ importOldRevision()

WikiRevision::importOldRevision ( )

◆ importUpload()

◆ isTempSrc()

WikiRevision::isTempSrc ( )
Returns
bool

Definition at line 413 of file WikiRevision.php.

References $isTemp.

Referenced by importUpload().

◆ setAction()

WikiRevision::setAction (   $action)
Parameters
string$action

Definition at line 263 of file WikiRevision.php.

References $action.

◆ setArchiveName()

WikiRevision::setArchiveName (   $archiveName)
Parameters
string$archiveName

Definition at line 242 of file WikiRevision.php.

References $archiveName.

◆ setComment()

WikiRevision::setComment (   $text)
Parameters
string$text

Definition at line 198 of file WikiRevision.php.

References $text, and comment.

◆ setFilename()

WikiRevision::setFilename (   $filename)
Parameters
string$filename

Definition at line 235 of file WikiRevision.php.

References $filename.

◆ setFileSrc()

WikiRevision::setFileSrc (   $src,
  $isTemp 
)
Parameters
string$src
bool$isTemp

Definition at line 220 of file WikiRevision.php.

References $isTemp, and $src.

◆ setFormat()

WikiRevision::setFormat (   $format)
Parameters
string$format

Definition at line 184 of file WikiRevision.php.

References $format, and format.

◆ setID()

WikiRevision::setID (   $id)
Parameters
int$id

Definition at line 141 of file WikiRevision.php.

References $id.

◆ setMinor()

WikiRevision::setMinor (   $minor)
Parameters
bool$minor

Definition at line 205 of file WikiRevision.php.

References $minor.

◆ setModel()

WikiRevision::setModel (   $model)
Parameters
string$model

Definition at line 177 of file WikiRevision.php.

References $model.

◆ setNoUpdates()

WikiRevision::setNoUpdates (   $noupdates)
Parameters
bool$noupdates

Definition at line 277 of file WikiRevision.php.

◆ setParams()

WikiRevision::setParams (   $params)
Parameters
array$params

Definition at line 270 of file WikiRevision.php.

References $params.

◆ setSha1Base36()

WikiRevision::setSha1Base36 (   $sha1base36)
Parameters
string$sha1base36

Definition at line 228 of file WikiRevision.php.

References $sha1base36.

◆ setSize()

WikiRevision::setSize (   $size)
Parameters
int$size

Definition at line 249 of file WikiRevision.php.

References $size.

◆ setSrc()

WikiRevision::setSrc (   $src)
Parameters
mixed$src

Definition at line 212 of file WikiRevision.php.

References $src.

◆ setText()

WikiRevision::setText (   $text)
Parameters
string$text

Definition at line 191 of file WikiRevision.php.

References $text, and text.

◆ setTimestamp()

WikiRevision::setTimestamp (   $ts)
Parameters
string$ts

Definition at line 148 of file WikiRevision.php.

References TS_MW, and wfTimestamp().

◆ setTitle()

WikiRevision::setTitle (   $title)
Parameters
Title$title
Exceptions
MWException

Definition at line 127 of file WikiRevision.php.

References $title, and title.

◆ setType()

WikiRevision::setType (   $type)
Parameters
string$type

Definition at line 256 of file WikiRevision.php.

References $type, and type.

◆ setUserIP()

WikiRevision::setUserIP (   $ip)
Parameters
string$ip

Definition at line 170 of file WikiRevision.php.

◆ setUsername()

WikiRevision::setUsername (   $user)
Parameters
string$user

Definition at line 156 of file WikiRevision.php.

References $user.

◆ setUserObj()

WikiRevision::setUserObj (   $user)
Parameters
User$user

Definition at line 163 of file WikiRevision.php.

References $user.

Member Data Documentation

◆ $action

string WikiRevision::$action = ""

Definition at line 85 of file WikiRevision.php.

Referenced by getAction(), importLogItem(), and setAction().

◆ $archiveName

string WikiRevision::$archiveName = ''

Definition at line 103 of file WikiRevision.php.

Referenced by getArchiveName(), importUpload(), and setArchiveName().

◆ $comment

string WikiRevision::$comment = ""

Definition at line 76 of file WikiRevision.php.

Referenced by getComment().

◆ $config

Config WikiRevision::$config
private

Definition at line 117 of file WikiRevision.php.

Referenced by __construct().

◆ $content

Content WikiRevision::$content = null

Definition at line 70 of file WikiRevision.php.

Referenced by getContent().

◆ $contentHandler

ContentHandler WikiRevision::$contentHandler = null
protected

Definition at line 73 of file WikiRevision.php.

Referenced by getContentHandler().

◆ $fileIsTemp

WikiRevision::$fileIsTemp
Todo:
Unused?

Definition at line 111 of file WikiRevision.php.

◆ $filename

WikiRevision::$filename
protected

Definition at line 105 of file WikiRevision.php.

Referenced by getFilename(), and setFilename().

◆ $fileSrc

string WikiRevision::$fileSrc = ''

Definition at line 91 of file WikiRevision.php.

Referenced by getFileSrc().

◆ $format

string WikiRevision::$format = null

Definition at line 61 of file WikiRevision.php.

Referenced by getFormat(), and setFormat().

◆ $id

int WikiRevision::$id = 0

Definition at line 41 of file WikiRevision.php.

Referenced by getID(), and setID().

◆ $importer

WikiRevision::$importer = null
Todo:
Unused?

Definition at line 35 of file WikiRevision.php.

◆ $isTemp

bool WikiRevision::$isTemp = false
Todo:
Unused?

Definition at line 100 of file WikiRevision.php.

Referenced by isTempSrc(), and setFileSrc().

◆ $minor

bool WikiRevision::$minor = false

Definition at line 79 of file WikiRevision.php.

Referenced by getMinor(), and setMinor().

◆ $mNoUpdates

bool WikiRevision::$mNoUpdates = false
private

Definition at line 114 of file WikiRevision.php.

◆ $model

string WikiRevision::$model = null

Definition at line 58 of file WikiRevision.php.

Referenced by getModel(), and setModel().

◆ $params

string WikiRevision::$params = ""

Definition at line 88 of file WikiRevision.php.

Referenced by getParams(), importLogItem(), and setParams().

◆ $sha1base36

bool string WikiRevision::$sha1base36 = false

Definition at line 94 of file WikiRevision.php.

Referenced by setSha1Base36().

◆ $size

int WikiRevision::$size
protected

Definition at line 67 of file WikiRevision.php.

Referenced by getSize(), and setSize().

◆ $src

mixed WikiRevision::$src
protected

Definition at line 108 of file WikiRevision.php.

Referenced by downloadSource(), getSrc(), setFileSrc(), and setSrc().

◆ $text

string WikiRevision::$text = ""

Definition at line 64 of file WikiRevision.php.

Referenced by getText(), setComment(), and setText().

◆ $timestamp

string WikiRevision::$timestamp = "20010115000000"

Definition at line 44 of file WikiRevision.php.

Referenced by getTimestamp().

◆ $title

Title WikiRevision::$title = null

Definition at line 38 of file WikiRevision.php.

Referenced by getTitle(), and setTitle().

◆ $type

string WikiRevision::$type = ""

Definition at line 82 of file WikiRevision.php.

Referenced by getType(), importLogItem(), and setType().

◆ $user

int WikiRevision::$user = 0
Todo:
Can't find any uses. Public, because that's suspicious. Get clarity.

Definition at line 49 of file WikiRevision.php.

Referenced by importLogItem(), importOldRevision(), importUpload(), setUsername(), and setUserObj().

◆ $user_text

string WikiRevision::$user_text = ""

Definition at line 52 of file WikiRevision.php.

Referenced by getUser().

◆ $userObj

User WikiRevision::$userObj = null

Definition at line 55 of file WikiRevision.php.

Referenced by getUserObj().


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