Wikibase
MediaWiki Wikibase extension
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. More...
 
 getResult ( $offset=0, $limit=0)
 Return the result of the query. More...
 
 showQuery (array $query=[], $subPage=false)
 Output the query result. More...
 
 outputResults (array $entityIds, $num, $offset)
 Format and output report results using the given information plus OutputPage. More...
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked. More...
 
 showErrorHTML ( $error)
 

Protected Attributes

const CACHE_TTL_IN_SECONDS = 10
 Max server side caching time in seconds. More...
 
 $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)

◆ 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
integer$offsetStart to include at number of entries from the start title
integer$limitStop at number of entries after start of inclusion
Returns
EntityId[]

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

◆ 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
integer$numnumber of available result rows
integer$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: