MediaWiki master
|
Request handler implementing a data interface for mediawiki pages. More...
Public Member Functions | |
canHandleRequest ( $subPage, WebRequest $request) | |
Checks whether the request is complete, i.e. | |
handleRequest ( $subPage, WebRequest $request, OutputPage $output) | |
Main method for handling requests. | |
httpContentNegotiation (WebRequest $request, OutputPage $output, Title $title, $revision=0) | |
Applies HTTP content negotiation. | |
Request handler implementing a data interface for mediawiki pages.
Definition at line 39 of file PageDataRequestHandler.php.
MediaWiki\LinkedData\PageDataRequestHandler::canHandleRequest | ( | $subPage, | |
WebRequest | $request ) |
Checks whether the request is complete, i.e.
whether it contains all information needed to reply with page data.
This does not check whether the request is valid and will actually produce a successful response.
string | null | $subPage | |
WebRequest | $request |
Definition at line 53 of file PageDataRequestHandler.php.
References MediaWiki\Request\WebRequest\getText().
Referenced by MediaWiki\LinkedData\PageDataRequestHandler\handleRequest().
MediaWiki\LinkedData\PageDataRequestHandler::handleRequest | ( | $subPage, | |
WebRequest | $request, | ||
OutputPage | $output ) |
Main method for handling requests.
string | null | $subPage | |
WebRequest | $request | The request parameters. Known parameters are:
|
OutputPage | $output |
HttpError |
Definition at line 79 of file PageDataRequestHandler.php.
References MediaWiki\LinkedData\PageDataRequestHandler\canHandleRequest(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Request\WebRequest\getInt(), MediaWiki\Context\ContextSource\getRequest(), MediaWiki\Request\WebRequest\getText(), MediaWiki\LinkedData\PageDataRequestHandler\httpContentNegotiation(), and wfMessage().
MediaWiki\LinkedData\PageDataRequestHandler::httpContentNegotiation | ( | WebRequest | $request, |
OutputPage | $output, | ||
Title | $title, | ||
$revision = 0 ) |
Applies HTTP content negotiation.
If the negotiation is successful, this method will set the appropriate redirect in the OutputPage object and return. Otherwise, an HttpError is thrown.
WebRequest | $request | |
OutputPage | $output | |
Title | $title | |
int | $revision | The desired revision |
HttpError |
Definition at line 125 of file PageDataRequestHandler.php.
References $url, MediaWiki\Title\Title\getContentModel(), MediaWiki\Request\WebRequest\getHeader(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Output\OutputPage\redirect(), and wfMessage().
Referenced by MediaWiki\LinkedData\PageDataRequestHandler\handleRequest().