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

Special page to act as a data endpoint for the linked data web. More...

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

Public Member Functions

 __construct ()
 
 setRequestHandler (EntityDataRequestHandler $requestHandler)
 Sets the request handler to be used by the special page.
 
 execute ( $subPage)
 
 showForm ()
 Shows an informative page to the user; Called when there is no entity to output.
 
 setEntityDataFormatProvider (EntityDataFormatProvider $entityDataFormatProvider)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 __construct ( $name='', $restriction='', $listed=true)
 
 getDescription ()
 
 setHeaders ()
 

Protected Member Functions

 initDependencies ()
 Initialize any un-initialized members from global context.
 
- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked.
 
 showErrorHTML ( $error)
 

Private Member Functions

 newDefaultRequestHandler ()
 Creates a EntityDataRequestHandler based on global defaults.
 

Private Attributes

 $requestHandler = null
 
 $entityDataFormatProvider = null
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 $stringNormalizer
 

Detailed Description

Special page to act as a data endpoint for the linked data web.

The web server should generally be configured to make this accessible via a canonical URL/URI, such as http://my.domain.org/entity/Q12345.

Note that this is implemented as a special page and not a per-page action, so there is no need for the web server to map ID prefixes to wiki namespaces.

Author
Daniel Kinzler
Thomas Pellissier Tanon
Anja Jentzsch < anja..nosp@m.jent.nosp@m.zsch@.nosp@m.wiki.nosp@m.media.nosp@m..de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialEntityData::__construct ( )

Member Function Documentation

◆ execute()

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

Reimplemented from Wikibase\Repo\Specials\SpecialWikibasePage.

◆ initDependencies()

Wikibase\Repo\Specials\SpecialEntityData::initDependencies ( )
protected

Initialize any un-initialized members from global context.

In particular, this initializes $this->requestHandler

This is called by

◆ newDefaultRequestHandler()

Wikibase\Repo\Specials\SpecialEntityData::newDefaultRequestHandler ( )
private

Creates a EntityDataRequestHandler based on global defaults.

Returns
EntityDataRequestHandler

◆ setEntityDataFormatProvider()

Wikibase\Repo\Specials\SpecialEntityData::setEntityDataFormatProvider ( EntityDataFormatProvider  $entityDataFormatProvider)
Parameters
EntityDataFormatProvider$entityDataFormatProvider

TODO: Inject them

◆ setRequestHandler()

Wikibase\Repo\Specials\SpecialEntityData::setRequestHandler ( EntityDataRequestHandler  $requestHandler)

Sets the request handler to be used by the special page.

May be used when a particular instance of EntityDataRequestHandler is already known, e.g. during testing.

If no request handler is set using this method, a default handler is created on demand by initDependencies().

Parameters
EntityDataRequestHandler$requestHandler

◆ showForm()

Wikibase\Repo\Specials\SpecialEntityData::showForm ( )

Shows an informative page to the user; Called when there is no entity to output.

Member Data Documentation

◆ $entityDataFormatProvider

Wikibase\Repo\Specials\SpecialEntityData::$entityDataFormatProvider = null
private

◆ $requestHandler

Wikibase\Repo\Specials\SpecialEntityData::$requestHandler = null
private

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