Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Specials\SpecialWikibaseQueryPage Class Reference

Base for special pages that show the result of a Query. More...

+ Inheritance diagram for Wikibase\Repo\Specials\SpecialWikibaseQueryPage:
+ Collaboration diagram for Wikibase\Repo\Specials\SpecialWikibaseQueryPage:

Public Member Functions

 __construct ( $name='', $restriction='', $listed=true)
 
 execute ( $subPage)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getDescription ()
 
 setHeaders ()
 

Protected Member Functions

 formatRow (EntityId $entityId)
 Formats a row for display.
 
 getResult ( $offset=0, $limit=0)
 Return the result of the query.
 
 showQuery (array $query=[], $subPage=false)
 Output the query result.
 
 outputResults (array $entityIds, $num, $offset)
 Format and output report results using the given information plus OutputPage.
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked.
 
 showErrorHTML ( $error)
 

Protected Attributes

const CACHE_TTL_IN_SECONDS = 10
 Max server side caching time in seconds.
 
 $offset = 0
 
 $limit = 0
 
 $numRows
 
- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 $stringNormalizer
 

Private Attributes

 $entityTitleLookup
 

Detailed Description

Base for special pages that show the result of a Query.

Rewriting of QueryPage but with abstraction of the storage system and without cache support.

Author
Thomas Pellissier Tanon

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::__construct ( $name = '',
$restriction = '',
$listed = true )
Parameters
string$name
string$restriction
bool$listed

Reimplemented from Wikibase\Repo\Specials\SpecialWikibasePage.

Member Function Documentation

◆ execute()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::execute ( $subPage)
See also
SpecialWikibasePage::execute
Parameters
string | null$subPage

Reimplemented from Wikibase\Repo\Specials\SpecialWikibasePage.

Reimplemented in Wikibase\Repo\Specials\SpecialItemsWithoutSitelinks, and Wikibase\Repo\Specials\SpecialListProperties.

◆ formatRow()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::formatRow ( EntityId $entityId)
protected

Formats a row for display.

Parameters
EntityId$entityId
Returns
string HTML

Reimplemented in Wikibase\Repo\Specials\SpecialListProperties.

◆ getResult()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::getResult ( $offset = 0,
$limit = 0 )
abstractprotected

Return the result of the query.

Parameters
int$offsetStart to include at number of entries from the start title
int$limitStop at number of entries after start of inclusion
Returns
EntityId[]

Reimplemented in Wikibase\Repo\Specials\SpecialItemsWithoutSitelinks, and Wikibase\Repo\Specials\SpecialListProperties.

◆ outputResults()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::outputResults ( array $entityIds,
$num,
$offset )
protected

Format and output report results using the given information plus OutputPage.

Parameters
EntityId[]$entityIds
int$numnumber of available result rows
int$offsetpaging offset

◆ showQuery()

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::showQuery ( array $query = [],
$subPage = false )
protected

Output the query result.

Parameters
array$queryoptional array of URL query parameter strings
string | bool$subPageOptional param for specifying subpage

Member Data Documentation

◆ $entityTitleLookup

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::$entityTitleLookup
private

◆ $limit

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::$limit = 0
protected

◆ $numRows

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::$numRows
protected

◆ $offset

Wikibase\Repo\Specials\SpecialWikibaseQueryPage::$offset = 0
protected

◆ CACHE_TTL_IN_SECONDS

const Wikibase\Repo\Specials\SpecialWikibaseQueryPage::CACHE_TTL_IN_SECONDS = 10
protected

Max server side caching time in seconds.


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