26private $requestHandler =
null;
29 parent::__construct(
'PageData' );
41 $this->requestHandler = $requestHandler;
49if ( $this->requestHandler ===
null ) {
50 $this->requestHandler = $this->newDefaultRequestHandler();
59privatefunction newDefaultRequestHandler() {
73// If there is no title, show an HTML form 74// TODO: Don't do this if HTML is not acceptable according to HTTP headers. 75if ( !$this->requestHandler->canHandleRequest( $subPage, $this->getRequest() ) ) {
87 $this->
getOutput()->showErrorPage(
'pagedata-title',
'pagedata-text' );
95class_alias( SpecialPageData::class,
'SpecialPageData' );
Show an error that looks like an HTTP server error.
Request handler implementing a data interface for mediawiki pages.
getRequest()
Get the WebRequest being used for this instance.
getOutput()
Get the OutputPage being used for this instance.
Shortcut to construct a special page which is unlisted by default.
Special page to act as an endpoint for accessing raw page data.
initDependencies()
Initialize any un-initialized members from global context.
setRequestHandler(PageDataRequestHandler $requestHandler)
Sets the request handler to be used by the special page.
showForm()
Shows an informative page to the user; Called when there is no page to output.