MediaWiki  master
WikiRevision Class Reference

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

Inheritance diagram for WikiRevision:
Collaboration diagram for WikiRevision:

Public Member Functions

 __construct (Config $config)
 
 downloadSource ()
 
 getAction ()
 
 getArchiveName ()
 
 getComment ()
 
 getContent ()
 
 getContentHandler ()
 
 getFilename ()
 
 getFileSrc ()
 
 getFormat ()
 
 getID ()
 
 getMinor ()
 
 getModel ()
 
 getParams ()
 
 getSha1 ()
 
 getSha1Base36 ()
 
 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
 
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 = ""
 
string $user_text = ""
 
User $userObj = null
 

Protected Attributes

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

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 37 of file WikiRevision.php.

Constructor & Destructor Documentation

◆ __construct()

WikiRevision::__construct ( Config  $config)

Definition at line 185 of file WikiRevision.php.

References $config.

Member Function Documentation

◆ downloadSource()

WikiRevision::downloadSource ( )
Since
1.12.2
Deprecated:
in 1.31. No replacement
Returns
bool|string

Definition at line 653 of file WikiRevision.php.

References ImportableUploadRevisionImporter\downloadSource().

◆ getAction()

WikiRevision::getAction ( )
Since
1.12.2
Returns
string

Definition at line 564 of file WikiRevision.php.

References $action.

Referenced by importLogItem().

◆ getArchiveName()

WikiRevision::getArchiveName ( )
Since
1.17
Returns
string

Implements ImportableUploadRevision.

Definition at line 540 of file WikiRevision.php.

References $archiveName.

◆ getComment()

WikiRevision::getComment ( )
Since
1.2.6
Returns
string

Implements ImportableOldRevision.

Definition at line 470 of file WikiRevision.php.

References $comment.

Referenced by importLogItem().

◆ getContent()

WikiRevision::getContent ( )
Since
1.21
Returns
Content

Implements ImportableOldRevision.

Definition at line 433 of file WikiRevision.php.

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

◆ getContentHandler()

WikiRevision::getContentHandler ( )
Since
1.24
Returns
ContentHandler

Definition at line 421 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 532 of file WikiRevision.php.

References $filename.

◆ getFileSrc()

WikiRevision::getFileSrc ( )
Since
1.17
Returns
string

Implements ImportableUploadRevision.

Definition at line 516 of file WikiRevision.php.

References $fileSrc.

◆ getFormat()

WikiRevision::getFormat ( )
Since
1.21
Returns
string

Implements ImportableOldRevision.

Definition at line 458 of file WikiRevision.php.

References $format, format, and getContentHandler().

Referenced by getContent().

◆ getID()

WikiRevision::getID ( )
Since
1.6.4
Returns
int

Definition at line 381 of file WikiRevision.php.

References $id.

◆ getMinor()

WikiRevision::getMinor ( )
Since
1.5.7
Returns
bool

Implements ImportableOldRevision.

Definition at line 478 of file WikiRevision.php.

References $minor.

◆ getModel()

WikiRevision::getModel ( )
Since
1.21
Returns
string

Implements ImportableOldRevision.

Definition at line 446 of file WikiRevision.php.

References $model, and getTitle().

Referenced by getContentHandler().

◆ getParams()

WikiRevision::getParams ( )
Since
1.12.2
Returns
string

Definition at line 572 of file WikiRevision.php.

References $params.

◆ getSha1()

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

Implements ImportableUploadRevision.

Definition at line 494 of file WikiRevision.php.

◆ getSha1Base36()

WikiRevision::getSha1Base36 ( )
Since
1.31
Returns
bool|string

Implements ImportableOldRevision.

Definition at line 505 of file WikiRevision.php.

References $sha1base36.

◆ getSize()

WikiRevision::getSize ( )
Since
1.12.2
Returns
mixed

Definition at line 548 of file WikiRevision.php.

References $size.

◆ getSrc()

WikiRevision::getSrc ( )
Since
1.12.2
Returns
string|null

Implements ImportableUploadRevision.

Definition at line 486 of file WikiRevision.php.

References $src.

◆ getText()

WikiRevision::getText ( )
Since
1.2
Returns
string

Definition at line 413 of file WikiRevision.php.

References $text.

◆ getTimestamp()

WikiRevision::getTimestamp ( )
Since
1.2
Returns
string

Implements ImportableOldRevision.

Definition at line 389 of file WikiRevision.php.

References $timestamp.

◆ getTitle()

WikiRevision::getTitle ( )
Since
1.2
Returns
Title

Implements ImportableOldRevision.

Definition at line 373 of file WikiRevision.php.

References $title.

Referenced by getModel(), and importLogItem().

◆ getType()

WikiRevision::getType ( )
Since
1.12.2
Returns
string

Definition at line 556 of file WikiRevision.php.

References $type.

Referenced by importLogItem().

◆ getUser()

WikiRevision::getUser ( )
Since
1.2
Returns
string

Implements ImportableOldRevision.

Definition at line 397 of file WikiRevision.php.

References $user_text.

Referenced by importLogItem().

◆ getUserObj()

WikiRevision::getUserObj ( )
Since
1.27
Returns
User

Implements ImportableOldRevision.

Definition at line 405 of file WikiRevision.php.

References $userObj.

Referenced by importLogItem().

◆ importLogItem()

◆ importOldRevision()

WikiRevision::importOldRevision ( )
Since
1.4.1
Deprecated:
in 1.31. Use OldRevisionImporter::import
Returns
bool

Definition at line 581 of file WikiRevision.php.

◆ importUpload()

WikiRevision::importUpload ( )
Since
1.12.2
Deprecated:
in 1.31. Use UploadRevisionImporter::import
Returns
bool

Definition at line 642 of file WikiRevision.php.

◆ isTempSrc()

WikiRevision::isTempSrc ( )
Since
1.17
Returns
bool

Implements ImportableUploadRevision.

Definition at line 524 of file WikiRevision.php.

References $isTemp.

◆ setAction()

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

Definition at line 349 of file WikiRevision.php.

References $action.

◆ setArchiveName()

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

Definition at line 325 of file WikiRevision.php.

References $archiveName.

◆ setComment()

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

Definition at line 274 of file WikiRevision.php.

References $text.

◆ setFilename()

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

Definition at line 317 of file WikiRevision.php.

References $filename.

◆ setFileSrc()

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

Definition at line 299 of file WikiRevision.php.

References $isTemp, and $src.

◆ setFormat()

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

Definition at line 258 of file WikiRevision.php.

References $format, and format.

◆ setID()

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

Definition at line 209 of file WikiRevision.php.

References $id.

◆ setMinor()

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

Definition at line 282 of file WikiRevision.php.

◆ setModel()

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

Definition at line 250 of file WikiRevision.php.

References $model.

◆ setNoUpdates()

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

Definition at line 365 of file WikiRevision.php.

◆ setParams()

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

Definition at line 357 of file WikiRevision.php.

References $params.

◆ setSha1Base36()

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

Definition at line 309 of file WikiRevision.php.

References $sha1base36.

◆ setSize()

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

Definition at line 333 of file WikiRevision.php.

◆ setSrc()

WikiRevision::setSrc (   $src)
Since
1.12.2
Parameters
string | null$src

Definition at line 290 of file WikiRevision.php.

References $src.

◆ setText()

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

Definition at line 266 of file WikiRevision.php.

References $text, and text.

◆ setTimestamp()

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

Definition at line 217 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 194 of file WikiRevision.php.

References $title, and title.

◆ setType()

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

Definition at line 341 of file WikiRevision.php.

References $type, and type.

◆ setUserIP()

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

Definition at line 242 of file WikiRevision.php.

◆ setUsername()

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

Definition at line 226 of file WikiRevision.php.

References $user.

◆ setUserObj()

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

Definition at line 234 of file WikiRevision.php.

References $user.

Member Data Documentation

◆ $action

string WikiRevision::$action = ""
Since
1.12.2

Definition at line 127 of file WikiRevision.php.

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

◆ $archiveName

string WikiRevision::$archiveName = ''
Since
1.17

Definition at line 151 of file WikiRevision.php.

Referenced by getArchiveName(), and setArchiveName().

◆ $comment

string WikiRevision::$comment = ""
Since
1.2.6

Definition at line 109 of file WikiRevision.php.

Referenced by getComment().

◆ $config

WikiRevision::$config
private

Definition at line 183 of file WikiRevision.php.

Referenced by __construct().

◆ $content

Content WikiRevision::$content = null
Since
1.21

Definition at line 97 of file WikiRevision.php.

Referenced by getContent().

◆ $contentHandler

ContentHandler WikiRevision::$contentHandler = null
protected
Since
1.24

Definition at line 103 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 177 of file WikiRevision.php.

◆ $filename

WikiRevision::$filename
protected
Since
1.12.2

Definition at line 156 of file WikiRevision.php.

Referenced by getFilename(), and setFilename().

◆ $fileSrc

string WikiRevision::$fileSrc = ''
Since
1.17

Definition at line 139 of file WikiRevision.php.

Referenced by getFileSrc().

◆ $format

string WikiRevision::$format = null
Since
1.21

Definition at line 79 of file WikiRevision.php.

Referenced by getFormat(), and setFormat().

◆ $id

int WikiRevision::$id = 0
Since
1.6.4

Definition at line 49 of file WikiRevision.php.

Referenced by getID(), and setID().

◆ $isTemp

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

Definition at line 169 of file WikiRevision.php.

Referenced by isTempSrc(), and setFileSrc().

◆ $minor

bool WikiRevision::$minor = false
Since
1.5.7

Definition at line 115 of file WikiRevision.php.

Referenced by getMinor().

◆ $mNoUpdates

bool WikiRevision::$mNoUpdates = false
private

Definition at line 180 of file WikiRevision.php.

◆ $model

string WikiRevision::$model = null
Since
1.21

Definition at line 73 of file WikiRevision.php.

Referenced by getModel(), and setModel().

◆ $params

string WikiRevision::$params = ""
Since
1.12.2

Definition at line 133 of file WikiRevision.php.

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

◆ $sha1base36

bool string WikiRevision::$sha1base36 = false
Since
1.17

Definition at line 145 of file WikiRevision.php.

Referenced by getSha1Base36(), and setSha1Base36().

◆ $size

int WikiRevision::$size
protected
Since
1.12.2

Definition at line 91 of file WikiRevision.php.

Referenced by getSize().

◆ $src

string null WikiRevision::$src = null
protected
Since
1.12.2

Definition at line 162 of file WikiRevision.php.

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

◆ $text

string WikiRevision::$text = ""
Since
1.2

Definition at line 85 of file WikiRevision.php.

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

◆ $timestamp

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

Definition at line 55 of file WikiRevision.php.

Referenced by getTimestamp().

◆ $title

Title WikiRevision::$title = null
Since
1.2

Definition at line 43 of file WikiRevision.php.

Referenced by getTitle(), and setTitle().

◆ $type

string WikiRevision::$type = ""
Since
1.12.2

Definition at line 121 of file WikiRevision.php.

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

◆ $user_text

string WikiRevision::$user_text = ""
Since
1.2

Definition at line 61 of file WikiRevision.php.

Referenced by getUser().

◆ $userObj

User WikiRevision::$userObj = null
Since
1.27

Definition at line 67 of file WikiRevision.php.

Referenced by getUserObj().


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