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

Since
1.2

Definition at line 35 of file WikiRevision.php.

Constructor & Destructor Documentation

◆ __construct()

WikiRevision::__construct ( Config $config)

Definition at line 198 of file WikiRevision.php.

References $config.

Member Function Documentation

◆ downloadSource()

WikiRevision::downloadSource ( )
Since
1.12.2
Returns
bool|string

Definition at line 814 of file WikiRevision.php.

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

Referenced by importUpload().

◆ getAction()

WikiRevision::getAction ( )
Since
1.12.2
Returns
string

Definition at line 566 of file WikiRevision.php.

References $action.

Referenced by importLogItem().

◆ getArchiveName()

WikiRevision::getArchiveName ( )
Since
1.17
Returns
string

Definition at line 542 of file WikiRevision.php.

References $archiveName.

Referenced by importUpload().

◆ getComment()

WikiRevision::getComment ( )
Since
1.2.6
Returns
string

Definition at line 483 of file WikiRevision.php.

References $comment.

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

◆ getContent()

WikiRevision::getContent ( )
Since
1.21
Returns
Content

Definition at line 446 of file WikiRevision.php.

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

Referenced by importOldRevision().

◆ getContentHandler()

WikiRevision::getContentHandler ( )
Since
1.24
Returns
ContentHandler

Definition at line 434 of file WikiRevision.php.

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

Referenced by getContent(), and getFormat().

◆ getFilename()

WikiRevision::getFilename ( )
Since
1.12.2
Returns
mixed

Definition at line 534 of file WikiRevision.php.

References $filename.

◆ getFileSrc()

WikiRevision::getFileSrc ( )
Since
1.17
Returns
string

Definition at line 518 of file WikiRevision.php.

References $fileSrc.

Referenced by importUpload().

◆ getFormat()

WikiRevision::getFormat ( )
Since
1.21
Returns
string

Definition at line 471 of file WikiRevision.php.

References $format, and getContentHandler().

Referenced by getContent(), and importOldRevision().

◆ getID()

WikiRevision::getID ( )
Since
1.6.4
Returns
int

Definition at line 394 of file WikiRevision.php.

References $id.

◆ getMinor()

WikiRevision::getMinor ( )
Since
1.5.7
Returns
bool

Definition at line 491 of file WikiRevision.php.

References $minor.

◆ getModel()

WikiRevision::getModel ( )
Since
1.21
Returns
string

Definition at line 459 of file WikiRevision.php.

References $model, and getTitle().

Referenced by getContentHandler(), and importOldRevision().

◆ getParams()

WikiRevision::getParams ( )
Since
1.12.2
Returns
string

Definition at line 574 of file WikiRevision.php.

References $params.

◆ getSha1()

WikiRevision::getSha1 ( )
Since
1.17
Returns
bool|string

Definition at line 507 of file WikiRevision.php.

Referenced by importUpload().

◆ getSize()

WikiRevision::getSize ( )
Since
1.12.2
Returns
mixed

Definition at line 550 of file WikiRevision.php.

References $size.

◆ getSrc()

WikiRevision::getSrc ( )
Since
1.12.2
Returns
mixed

Definition at line 499 of file WikiRevision.php.

References $src.

Referenced by downloadSource().

◆ getText()

WikiRevision::getText ( )
Since
1.2
Returns
string

Definition at line 426 of file WikiRevision.php.

References $text.

◆ getTimestamp()

WikiRevision::getTimestamp ( )
Since
1.2
Returns
string

Definition at line 402 of file WikiRevision.php.

References $timestamp.

Referenced by importUpload().

◆ getTitle()

WikiRevision::getTitle ( )
Since
1.2
Returns
Title

Definition at line 386 of file WikiRevision.php.

References $title.

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

◆ getType()

WikiRevision::getType ( )
Since
1.12.2
Returns
string

Definition at line 558 of file WikiRevision.php.

References $type.

Referenced by importLogItem().

◆ getUser()

WikiRevision::getUser ( )
Since
1.2
Returns
string

Definition at line 410 of file WikiRevision.php.

References $user_text.

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

◆ getUserObj()

WikiRevision::getUserObj ( )
Since
1.27
Returns
User

Definition at line 418 of file WikiRevision.php.

References $userObj.

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

◆ importLogItem()

WikiRevision::importLogItem ( )

◆ importOldRevision()

WikiRevision::importOldRevision ( )

◆ importUpload()

◆ isTempSrc()

WikiRevision::isTempSrc ( )
Since
1.17
Returns
bool

Definition at line 526 of file WikiRevision.php.

References $isTemp.

Referenced by importUpload().

◆ setAction()

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

Definition at line 362 of file WikiRevision.php.

References $action.

◆ setArchiveName()

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

Definition at line 338 of file WikiRevision.php.

References $archiveName.

◆ setComment()

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

Definition at line 287 of file WikiRevision.php.

References $text.

◆ setFilename()

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

Definition at line 330 of file WikiRevision.php.

References $filename.

◆ setFileSrc()

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

Definition at line 312 of file WikiRevision.php.

References $isTemp, and $src.

◆ setFormat()

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

Definition at line 271 of file WikiRevision.php.

References $format.

◆ setID()

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

Definition at line 222 of file WikiRevision.php.

References $id.

◆ setMinor()

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

Definition at line 295 of file WikiRevision.php.

References $minor.

◆ setModel()

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

Definition at line 263 of file WikiRevision.php.

References $model.

◆ setNoUpdates()

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

Definition at line 378 of file WikiRevision.php.

◆ setParams()

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

Definition at line 370 of file WikiRevision.php.

References $params.

◆ setSha1Base36()

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

Definition at line 322 of file WikiRevision.php.

References $sha1base36.

◆ setSize()

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

Definition at line 346 of file WikiRevision.php.

References $size.

◆ setSrc()

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

Definition at line 303 of file WikiRevision.php.

References $src.

◆ setText()

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

Definition at line 279 of file WikiRevision.php.

References $text.

◆ setTimestamp()

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

Definition at line 230 of file WikiRevision.php.

References wfTimestamp().

◆ setTitle()

WikiRevision::setTitle ( $title)
Since
1.7 taking a Title object (string before)
Parameters
Title$title
Exceptions
MWException

Definition at line 207 of file WikiRevision.php.

References $title.

◆ setType()

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

Definition at line 354 of file WikiRevision.php.

References $type, and type.

◆ setUserIP()

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

Definition at line 255 of file WikiRevision.php.

◆ setUsername()

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

Definition at line 239 of file WikiRevision.php.

References $user.

◆ setUserObj()

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

Definition at line 247 of file WikiRevision.php.

References $user.

Member Data Documentation

◆ $action

string WikiRevision::$action = ""
Since
1.12.2

Definition at line 140 of file WikiRevision.php.

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

◆ $archiveName

string WikiRevision::$archiveName = ''
Since
1.17

Definition at line 164 of file WikiRevision.php.

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

◆ $comment

string WikiRevision::$comment = ""
Since
1.2.6

Definition at line 122 of file WikiRevision.php.

Referenced by getComment().

◆ $config

Config WikiRevision::$config
private

Definition at line 196 of file WikiRevision.php.

Referenced by __construct().

◆ $content

Content WikiRevision::$content = null
Since
1.21

Definition at line 110 of file WikiRevision.php.

Referenced by getContent().

◆ $contentHandler

ContentHandler WikiRevision::$contentHandler = null
protected
Since
1.24

Definition at line 116 of file WikiRevision.php.

Referenced by getContentHandler().

◆ $fileIsTemp

WikiRevision::$fileIsTemp
Since
1.18
Deprecated
1.29 use Wikirevision::isTempSrc() First written to in 43d5d3b682cc1733ad01a837d11af4a402d57e6a Actually introduced in 52cd34acf590e5be946b7885ffdc13a157c1c6cf

Definition at line 190 of file WikiRevision.php.

◆ $filename

WikiRevision::$filename
protected
Since
1.12.2

Definition at line 169 of file WikiRevision.php.

Referenced by getFilename(), and setFilename().

◆ $fileSrc

string WikiRevision::$fileSrc = ''
Since
1.17

Definition at line 152 of file WikiRevision.php.

Referenced by getFileSrc().

◆ $format

string WikiRevision::$format = null
Since
1.21

Definition at line 92 of file WikiRevision.php.

Referenced by getFormat(), and setFormat().

◆ $id

int WikiRevision::$id = 0
Since
1.6.4

Definition at line 54 of file WikiRevision.php.

Referenced by getID(), and setID().

◆ $importer

WikiRevision::$importer = null
Since
1.17
Deprecated
in 1.29. Unused.
Note
Introduced in 9b3128eb2b654761f21fd4ca1d5a1a4b796dc912, unused there, unused now.

Definition at line 42 of file WikiRevision.php.

◆ $isTemp

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

Definition at line 182 of file WikiRevision.php.

Referenced by isTempSrc(), and setFileSrc().

◆ $minor

bool WikiRevision::$minor = false
Since
1.5.7

Definition at line 128 of file WikiRevision.php.

Referenced by getMinor(), and setMinor().

◆ $mNoUpdates

bool WikiRevision::$mNoUpdates = false
private

Definition at line 193 of file WikiRevision.php.

◆ $model

string WikiRevision::$model = null
Since
1.21

Definition at line 86 of file WikiRevision.php.

Referenced by getModel(), and setModel().

◆ $params

string WikiRevision::$params = ""
Since
1.12.2

Definition at line 146 of file WikiRevision.php.

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

◆ $sha1base36

bool string WikiRevision::$sha1base36 = false
Since
1.17

Definition at line 158 of file WikiRevision.php.

Referenced by setSha1Base36().

◆ $size

int WikiRevision::$size
protected
Since
1.12.2

Definition at line 104 of file WikiRevision.php.

Referenced by getSize(), and setSize().

◆ $src

mixed WikiRevision::$src
protected
Since
1.12.2

Definition at line 175 of file WikiRevision.php.

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

◆ $text

string WikiRevision::$text = ""
Since
1.2

Definition at line 98 of file WikiRevision.php.

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

◆ $timestamp

string WikiRevision::$timestamp = "20010115000000"
Since
1.2

Definition at line 60 of file WikiRevision.php.

Referenced by getTimestamp().

◆ $title

Title WikiRevision::$title = null
Since
1.2

Definition at line 48 of file WikiRevision.php.

Referenced by getTitle(), and setTitle().

◆ $type

string WikiRevision::$type = ""
Since
1.12.2

Definition at line 134 of file WikiRevision.php.

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

◆ $user

int WikiRevision::$user = 0
Since
1.2
Deprecated
in 1.29. Unused.
Note
Introduced in 436a028086fb3f01c4605c5ad2964d56f9306aca, unused there, unused now.

Definition at line 68 of file WikiRevision.php.

Referenced by setUsername(), and setUserObj().

◆ $user_text

string WikiRevision::$user_text = ""
Since
1.2

Definition at line 74 of file WikiRevision.php.

Referenced by getUser().

◆ $userObj

User WikiRevision::$userObj = null
Since
1.27

Definition at line 80 of file WikiRevision.php.

Referenced by getUserObj().


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