MediaWiki 1.42.1
MediaWiki\Page\PageStore Class Reference

Inherits MediaWiki\Page\PageLookup.

Collaboration diagram for MediaWiki\Page\PageStore:

Public Member Functions

 __construct (ServiceOptions $options, ILoadBalancer $dbLoadBalancer, NamespaceInfo $namespaceInfo, TitleParser $titleParser, ?LinkCache $linkCache, ?StatsdDataFactoryInterface $stats, $wikiId=WikiAwareEntity::LOCAL)
 
 getExistingPageByText (string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getPageById (int $pageId, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getPageByName (int $namespace, string $dbKey, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getPageByReference (PageReference $page, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getPageByText (string $text, int $defaultNamespace=NS_MAIN, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getPageForLink (ParsoidLinkTarget $link, int $queryFlags=IDBAccessObject::READ_NORMAL)
 
 getSelectFields ()
 
 getSubpages (PageIdentity $page, int $limit)
 Get all subpages of this page.
 
 newPageRecordFromRow (stdClass $row)
 
 newSelectQueryBuilder ( $dbOrFlags=IDBAccessObject::READ_NORMAL)
 
- Public Member Functions inherited from MediaWiki\Page\PageLookup
 getPageForLink (LinkTarget $link, int $queryFlags=IDBAccessObject::READ_NORMAL)
 Returns the PageIdentity for the given LinkTarget.
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Detailed Description

Since
1.36
Stability: unstable

Definition at line 29 of file PageStore.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Page\PageStore::__construct ( ServiceOptions $options,
ILoadBalancer $dbLoadBalancer,
NamespaceInfo $namespaceInfo,
TitleParser $titleParser,
?LinkCache $linkCache,
?StatsdDataFactoryInterface $stats,
$wikiId = WikiAwareEntity::LOCAL )
Parameters
ServiceOptions$options
ILoadBalancer$dbLoadBalancer
NamespaceInfo$namespaceInfo
TitleParser$titleParser
?LinkCache$linkCache
?StatsdDataFactoryInterface$stats
false | string$wikiId

Definition at line 68 of file PageStore.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions().

Member Function Documentation

◆ getExistingPageByText()

MediaWiki\Page\PageStore::getExistingPageByText ( string $text,
int $defaultNamespace = NS_MAIN,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Since
1.37
Parameters
string$text
int$defaultNamespaceNamespace to assume per default (usually NS_MAIN)
int$queryFlags
Returns
ExistingPageRecord|null

Implements MediaWiki\Page\PageLookup.

Definition at line 275 of file PageStore.php.

◆ getPageById()

MediaWiki\Page\PageStore::getPageById ( int $pageId,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Parameters
int$pageId
int$queryFlags
Returns
ExistingPageRecord|null

Implements MediaWiki\Page\PageLookup.

Definition at line 293 of file PageStore.php.

◆ getPageByName()

MediaWiki\Page\PageStore::getPageByName ( int $namespace,
string $dbKey,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Parameters
int$namespace
string$dbKey
int$queryFlags
Returns
ExistingPageRecord|null

Implements MediaWiki\Page\PageLookup.

Definition at line 140 of file PageStore.php.

◆ getPageByReference()

MediaWiki\Page\PageStore::getPageByReference ( PageReference $page,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Parameters
PageReference$page
int$queryFlags
Returns
ExistingPageRecord|null The page's PageRecord, or null if the page was not found.

Implements MediaWiki\Page\PageLookup.

Definition at line 314 of file PageStore.php.

◆ getPageByText()

MediaWiki\Page\PageStore::getPageByText ( string $text,
int $defaultNamespace = NS_MAIN,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Since
1.37
Parameters
string$text
int$defaultNamespaceNamespace to assume per default (usually NS_MAIN)
int$queryFlags
Returns
ProperPageIdentity|null

Implements MediaWiki\Page\PageLookup.

Definition at line 251 of file PageStore.php.

◆ getPageForLink()

MediaWiki\Page\PageStore::getPageForLink ( ParsoidLinkTarget $link,
int $queryFlags = IDBAccessObject::READ_NORMAL )
Parameters
ParsoidLinkTarget$link
int$queryFlags
Returns
ProperPageIdentity

Definition at line 108 of file PageStore.php.

◆ getSelectFields()

MediaWiki\Page\PageStore::getSelectFields ( )
Access: internal
Returns
string[]

Definition at line 367 of file PageStore.php.

◆ getSubpages()

MediaWiki\Page\PageStore::getSubpages ( PageIdentity $page,
int $limit )

Get all subpages of this page.

Will return an empty list of the namespace doesn't support subpages.

Parameters
PageIdentity$page
int$limitMaximum number of subpages to fetch
Returns
Iterator<ExistingPageRecord>

Definition at line 430 of file PageStore.php.

◆ newPageRecordFromRow()

MediaWiki\Page\PageStore::newPageRecordFromRow ( stdClass $row)
Access: internal
Parameters
stdClass$row
Returns
ExistingPageRecord

Definition at line 355 of file PageStore.php.

◆ newSelectQueryBuilder()

MediaWiki\Page\PageStore::newSelectQueryBuilder ( $dbOrFlags = IDBAccessObject::READ_NORMAL)
Stability: unstable
Parameters
IReadableDatabase | int$dbOrFlagsThe database connection to use, or a READ_XXX constant indicating what kind of database connection to use.
Returns
PageSelectQueryBuilder

Definition at line 402 of file PageStore.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Page\PageStore::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const PageLanguageUseDB
Name constant for the PageLanguageUseDB setting, for use with Config::get()
Access: internal
for use by service wiring

Definition at line 55 of file PageStore.php.


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