MediaWiki REL1_35
|
Service for constructing revision objects. More...
Public Member Functions | |
newMutableRevisionFromArray (array $fields, $queryFlags=self::READ_NORMAL, Title $title=null) | |
Constructs a new RevisionRecord based on the given associative array following the MW1.29 database convention for the Revision constructor. | |
newRevisionFromArchiveRow ( $row, $queryFlags=self::READ_NORMAL, Title $title=null, array $overrides=[]) | |
Make a fake revision object from an archive table row. | |
newRevisionFromRow ( $row, $queryFlags=self::READ_NORMAL, Title $title=null) | |
Constructs a RevisionRecord given a database row and content slots. | |
Additional Inherited Members | |
Public Attributes inherited from IDBAccessObject | |
const | READ_LOCKING = self::READ_LATEST | 2 |
Constants for object loading bitfield flags (higher => higher QoS) | |
const | READ_NONE = -1 |
Service for constructing revision objects.
Definition at line 38 of file RevisionFactory.php.
MediaWiki\Revision\RevisionFactory::newMutableRevisionFromArray | ( | array | $fields, |
$queryFlags = self::READ_NORMAL , |
|||
Title | $title = null |
||
) |
Constructs a new RevisionRecord based on the given associative array following the MW1.29 database convention for the Revision constructor.
MCR migration note: this replaces Revision::newFromRow
array | $fields | |
int | $queryFlags | Flags for lazy loading behavior, see IDBAccessObject::READ_XXX. |
Title | null | $title |
MWException |
Implemented in MediaWiki\Revision\RevisionStore.
MediaWiki\Revision\RevisionFactory::newRevisionFromArchiveRow | ( | $row, | |
$queryFlags = self::READ_NORMAL , |
|||
Title | $title = null , |
||
array | $overrides = [] |
||
) |
Make a fake revision object from an archive table row.
This is queried for permissions or even inserted (as in Special:Undelete)
MCR migration note: this replaces Revision::newFromArchiveRow
object | $row | A query result row as a raw object. Use RevisionStore::getArchiveQueryInfo() to build a query that yields the required fields. |
int | $queryFlags | Flags for lazy loading behavior, see IDBAccessObject::READ_XXX. |
Title | null | $title | |
array | $overrides | An associative array that allows fields in $row to be overwritten. Keys in this array correspond to field names in $row without the "ar_" prefix, so $overrides['user'] will override $row->ar_user, etc. |
Implemented in MediaWiki\Revision\RevisionStore.
MediaWiki\Revision\RevisionFactory::newRevisionFromRow | ( | $row, | |
$queryFlags = self::READ_NORMAL , |
|||
Title | $title = null |
||
) |
Constructs a RevisionRecord given a database row and content slots.
MCR migration note: this replaces Revision::newFromRow for rows based on the revision, slot, and content tables defined for MCR since MW1.31.
object | $row | A query result row as a raw object. Use RevisionStore::getQueryInfo() to build a query that yields the required fields. |
int | $queryFlags | Flags for lazy loading behavior, see IDBAccessObject::READ_XXX. |
Title | null | $title | A title object for the revision. Use Title::newFromRow when query was built with option 'page' on RevisionStore::getQueryInfo for performance reason |