MediaWiki REL1_39
|
Service for constructing RevisionRecord objects. More...
Public Member Functions | |
getArchiveQueryInfo () | |
Return the tables, fields, and join conditions to be selected to create a new RevisionArchiveRecord object. | |
getQueryInfo ( $options=[]) | |
Return the tables, fields, and join conditions to be selected to create a new RevisionStoreRecord object. | |
isRevisionRow ( $row, string $table='') | |
Determine whether the parameter is a row containing all the fields that RevisionFactory needs to create a RevisionRecord from the row. | |
newRevisionFromArchiveRow ( $row, $queryFlags=self::READ_NORMAL, PageIdentity $page=null, array $overrides=[]) | |
Make a fake RevisionRecord object from an archive table row. | |
newRevisionFromRow ( $row, $queryFlags=self::READ_NORMAL, PageIdentity $page=null) | |
Constructs a RevisionRecord given a database row and content slots. | |
Additional Inherited Members | |
Public Attributes inherited from IDBAccessObject | |
const | READ_NONE = -1 |
Constants for object loading bitfield flags (higher => higher QoS) | |
Service for constructing RevisionRecord objects.
Definition at line 37 of file RevisionFactory.php.
MediaWiki\Revision\RevisionFactory::getArchiveQueryInfo | ( | ) |
Return the tables, fields, and join conditions to be selected to create a new RevisionArchiveRecord object.
$table
to IDatabase->select()
or SelectQueryBuilder::tables
$vars
to IDatabase->select()
or SelectQueryBuilder::fields
$join_conds
to IDatabase->select()
or SelectQueryBuilder::joinConds
Implemented in MediaWiki\Revision\RevisionStore.
MediaWiki\Revision\RevisionFactory::getQueryInfo | ( | $options = [] | ) |
Return the tables, fields, and join conditions to be selected to create a new RevisionStoreRecord object.
MCR migration note: this replaced Revision::getQueryInfo
If the format of fields returned changes in any way then the cache key provided by self::getRevisionRowCacheKey should be updated.
array | $options | Any combination of the following strings
|
$table
to IDatabase->select()
or SelectQueryBuilder::tables
$vars
to IDatabase->select()
or SelectQueryBuilder::fields
$join_conds
to IDatabase->select()
or SelectQueryBuilder::joinConds
Implemented in MediaWiki\Revision\RevisionStore.
MediaWiki\Revision\RevisionFactory::isRevisionRow | ( | $row, | |
string | $table = '' ) |
Determine whether the parameter is a row containing all the fields that RevisionFactory needs to create a RevisionRecord from the row.
mixed | $row | |
string | $table | 'archive' or empty |
Implemented in MediaWiki\Revision\RevisionStore.
MediaWiki\Revision\RevisionFactory::newRevisionFromArchiveRow | ( | $row, | |
$queryFlags = self::READ_NORMAL, | |||
PageIdentity | $page = null, | ||
array | $overrides = [] ) |
Make a fake RevisionRecord object from an archive table row.
This is queried for permissions or even inserted (as in Special:Undelete).
The user ID and user name may optionally be supplied using the aliases ar_user and ar_user_text (the names of fields which existed before MW 1.34).
MCR migration note: this replaced Revision::newFromArchiveRow
\\stdClass | $row | A query result row as a raw object. Use getArchiveQueryInfo() to build a query that yields the required fields. |
int | $queryFlags | Flags for lazy loading behavior, see IDBAccessObject::READ_XXX. |
PageIdentity | null | $page | |
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, | |||
PageIdentity | $page = null ) |
Constructs a RevisionRecord given a database row and content slots.
MCR migration note: this replaced Revision::newFromRow for rows based on the revision, slot, and content tables defined for MCR since MW1.31.
\\stdClass | $row | A query result row as a raw object. Use getQueryInfo() to build a query that yields the required fields. |
int | $queryFlags | Flags for lazy loading behavior, see IDBAccessObject::READ_XXX. |
PageIdentity | null | $page | A page object for the revision. |