MediaWiki REL1_32
|
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. | |
newRevisionFromArchiveRow ( $row, $queryFlags=0, Title $title=null, array $overrides=[]) | |
Make a fake revision object from an archive table row. | |
newRevisionFromRow ( $row, $queryFlags=0, Title $title=null) | |
Constructs a RevisionRecord given a database row and content slots. | |
Service for constructing revision objects.
Definition at line 37 of file RevisionFactory.php.
MediaWiki\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 MediaWiki\Revision\RevisionStore.
MediaWiki\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 MediaWiki\Revision\RevisionStore.
MediaWiki\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 |
Implemented in MediaWiki\Revision\RevisionStore.