MediaWiki master
|
Immutable data record representing an editable page on a wiki. More...
Inherits MediaWiki\Page\PageIdentityValue, and MediaWiki\Page\ExistingPageRecord.
Public Member Functions | ||||
__construct (stdClass $row, $wikiId) | ||||
The $row object must provide all fields listed in PageStoreRecord::REQUIRED_FIELDS. | ||||
getField (string $field) | ||||
Return the raw value for the given field as returned by the database query. | ||||
getLanguage () | ||||
Language in which the page is written. | ||||
getLatest ( $wikiId=self::LOCAL) | ||||
The ID of the page'S latest revision. | ||||
getTouched () | ||||
Timestamp at which the page was last rerendered. | ||||
isNew () | ||||
False if the page has had more than one edit. | ||||
isRedirect () | ||||
True if the page is a redirect. | ||||
Public Member Functions inherited from MediaWiki\Page\PageIdentityValue | ||||
__construct (int $pageId, int $namespace, string $dbKey, $wikiId) | ||||
canExist () | ||||
exists () | ||||
Returns whether the page currently exists. | ||||
getId ( $wikiId=self::LOCAL) | ||||
The numerical page ID provided to the constructor. | ||||
Public Member Functions inherited from MediaWiki\Page\PageReferenceValue | ||||
__construct (int $namespace, string $dbKey, $wikiId) | ||||
__toString () | ||||
Returns a string representation of the title, for logging. | ||||
getDBkey () | ||||
Get the page title in DB key form.
| ||||
getNamespace () | ||||
Returns the page's namespace number.The value returned by this method should represent a valid namespace, but this cannot be guaranteed in all cases.
| ||||
getWikiId () | ||||
Get the ID of the wiki provided to the constructor. | ||||
isSamePageAs (PageReference $other) | ||||
Checks whether the given PageReference refers to the same page as this PageReference.Two PageReference instances are considered to refer to the same page if they belong to the same wiki, and have the same namespace and DB key.
| ||||
Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity | ||||
assertWiki ( $wikiId) | ||||
Throws if $wikiId is different from the return value of getWikiId(). | ||||
Public Member Functions inherited from MediaWiki\Page\ProperPageIdentity | ||||
getDBkey () | ||||
Get the page title in DB key form. | ||||
getWikiId () | ||||
Get the ID of the wiki this page belongs to. | ||||
Public Member Functions inherited from MediaWiki\Page\ExistingPageRecord | ||||
exists () | ||||
Always true. | ||||
Public Attributes | |
const | REQUIRED_FIELDS |
Fields that must be present in the row object passed to the constructor. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Page\PageIdentityValue | |
static | localIdentity (int $pageId, int $namespace, string $dbKey) |
Create PageIdentity for a local page. | |
static | tryNew (int $pageId, int $namespace, string $dbKey, $wikiId) |
Constructs a PageIdentityValue, or returns null if the parameters are not valid. | |
Static Public Member Functions inherited from MediaWiki\Page\PageReferenceValue | |
static | localReference (int $namespace, string $dbKey) |
Create PageReference for a local page. | |
Immutable data record representing an editable page on a wiki.
Corresponds to a row in the page table.
Definition at line 36 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::__construct | ( | stdClass | $row, |
$wikiId ) |
The $row object must provide all fields listed in PageStoreRecord::REQUIRED_FIELDS.
stdClass | $row | A row from the page table |
string | false | $wikiId | The Id of the wiki this page belongs to, or self::LOCAL for the local wiki. |
Definition at line 68 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::getField | ( | string | $field | ) |
Return the raw value for the given field as returned by the database query.
Numeric values may be encoded as strings. Boolean values may be represented as integers (or numeric strings). Timestamps will use the database's native format.
string | $field |
Definition at line 141 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::getLanguage | ( | ) |
Language in which the page is written.
Implements MediaWiki\Page\PageRecord.
Definition at line 124 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::getLatest | ( | $wikiId = self::LOCAL | ) |
The ID of the page'S latest revision.
string | false | $wikiId |
Implements MediaWiki\Page\PageRecord.
Definition at line 105 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::getTouched | ( | ) |
Timestamp at which the page was last rerendered.
Implements MediaWiki\Page\PageRecord.
Definition at line 115 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::isNew | ( | ) |
False if the page has had more than one edit.
Implements MediaWiki\Page\PageRecord.
Definition at line 85 of file PageStoreRecord.php.
MediaWiki\Page\PageStoreRecord::isRedirect | ( | ) |
True if the page is a redirect.
Implements MediaWiki\Page\PageRecord.
Definition at line 94 of file PageStoreRecord.php.
const MediaWiki\Page\PageStoreRecord::REQUIRED_FIELDS |
Fields that must be present in the row object passed to the constructor.
Note that page_lang is optional, so it is not included here.
Definition at line 44 of file PageStoreRecord.php.
Referenced by MediaWiki\Cache\LinkCache\getSelectFields().