MediaWiki REL1_35
MediaWiki\Rest\Entity\SearchResultPageIdentityValue Class Reference

Lightweight value class representing a page identity. More...

Inheritance diagram for MediaWiki\Rest\Entity\SearchResultPageIdentityValue:
Collaboration diagram for MediaWiki\Rest\Entity\SearchResultPageIdentityValue:

Public Member Functions

 __construct (int $id, int $namespace, string $dbKey)
 
 getDBkey ()
 Get the page title in DB key form.
 
 getId ()
 The numerical page ID.
 
 getNamespace ()
 Returns the page's namespace number.
 

Private Attributes

string $dbKey = ''
 
int $id = 0
 
int $namespace = null
 

Detailed Description

Lightweight value class representing a page identity.

@unstable

Note
This class is temorary solution. It will be replaced by the one from: https://phabricator.wikimedia.org/T208776

Definition at line 11 of file SearchResultPageIdentityValue.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Entity\SearchResultPageIdentityValue::__construct ( int  $id,
int  $namespace,
string  $dbKey 
)

Member Function Documentation

◆ getDBkey()

MediaWiki\Rest\Entity\SearchResultPageIdentityValue::getDBkey ( )

Get the page title in DB key form.

At the moment it is equivalent to Title::getDBkey()

See also
Title::getDBkey()
Returns
string

Implements MediaWiki\Rest\Entity\SearchResultPageIdentity.

Definition at line 42 of file SearchResultPageIdentityValue.php.

◆ getId()

MediaWiki\Rest\Entity\SearchResultPageIdentityValue::getId ( )

The numerical page ID.

At the moment it is equivalent to Title::getArticleID()

See also
Title::getArticleID()
Returns
int

Implements MediaWiki\Rest\Entity\SearchResultPageIdentity.

Definition at line 34 of file SearchResultPageIdentityValue.php.

◆ getNamespace()

MediaWiki\Rest\Entity\SearchResultPageIdentityValue::getNamespace ( )

Returns the page's namespace number.

At the moment it is equivalent to Title::getNamespace()

See also
Title::getNamespace()
Returns
int

Implements MediaWiki\Rest\Entity\SearchResultPageIdentity.

Definition at line 38 of file SearchResultPageIdentityValue.php.

Member Data Documentation

◆ $dbKey

string MediaWiki\Rest\Entity\SearchResultPageIdentityValue::$dbKey = ''
private

◆ $id

int MediaWiki\Rest\Entity\SearchResultPageIdentityValue::$id = 0
private

◆ $namespace

int MediaWiki\Rest\Entity\SearchResultPageIdentityValue::$namespace = null
private

Definition at line 26 of file SearchResultPageIdentityValue.php.


The documentation for this class was generated from the following file: