MediaWiki
1.34.0
|
Service for constructing revision objects. More...
Public Member Functions | |
newMutableRevisionFromArray (array $fields, $queryFlags=0, Title $title=null) | |
Constructs a new RevisionRecord based on the given associative array following the MW1.29 database convention for the Revision constructor. More... | |
newRevisionFromArchiveRow ( $row, $queryFlags=0, Title $title=null, array $overrides=[]) | |
Make a fake revision object from an archive table row. More... | |
newRevisionFromRow ( $row, $queryFlags=0, Title $title=null) | |
Constructs a RevisionRecord given a database row and content slots. More... | |
Service for constructing revision objects.
Definition at line 37 of file RevisionFactory.php.
Revision\RevisionFactory::newMutableRevisionFromArray | ( | array | $fields, |
$queryFlags = 0 , |
|||
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 Revision\RevisionStore.
Revision\RevisionFactory::newRevisionFromArchiveRow | ( | $row, | |
$queryFlags = 0 , |
|||
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 Revision\RevisionStore.
Revision\RevisionFactory::newRevisionFromRow | ( | $row, | |
$queryFlags = 0 , |
|||
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 |