MediaWiki master
|
Inherited by MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Public Member Functions | |
__construct (ServiceOptions $options, RevisionLookup $revisionLookup, TitleFormatter $titleFormatter, PageLookup $pageLookup) | |
checkAccess () | |
checkAccessPermission () | |
checkHasContent () | |
constructMetadata () | |
getContent () | |
getDefaultSystemMessage () | |
getETag () | |
Returns an ETag representing a page's source. | |
getLastModified () | |
getPage () | |
getPageIdentity () | |
getParamSettings () | |
getRole () | |
getTargetRevision () | |
Returns the target revision. | |
getTitleText () | |
hasContent () | |
Checks whether content exists. | |
init (Authority $authority, array $parameters) | |
isAccessible () | |
setCacheControl (ResponseInterface $response, int $expiry=null) | |
Sets the 'Cache-Control' header no more then provided $expiry. | |
useDefaultSystemMessage () | |
If the page is a system message page. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Protected Attributes | |
Authority null | $authority = null |
ServiceOptions | $options |
PageLookup | $pageLookup |
ExistingPageRecord false null | $pageRecord = false |
string[] | $parameters = null |
RevisionLookup | $revisionLookup |
RevisionRecord false null | $targetRevision = false |
TitleFormatter | $titleFormatter |
Definition at line 31 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::__construct | ( | ServiceOptions | $options, |
RevisionLookup | $revisionLookup, | ||
TitleFormatter | $titleFormatter, | ||
PageLookup | $pageLookup ) |
Definition at line 74 of file PageContentHelper.php.
References MediaWiki\Rest\Handler\Helper\PageContentHelper\$options, MediaWiki\Rest\Handler\Helper\PageContentHelper\$pageLookup, MediaWiki\Rest\Handler\Helper\PageContentHelper\$revisionLookup, and MediaWiki\Rest\Handler\Helper\PageContentHelper\$titleFormatter.
MediaWiki\Rest\Handler\Helper\PageContentHelper::checkAccess | ( | ) |
LocalizedHttpException | if the content is not accessible |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 378 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::checkAccessPermission | ( | ) |
LocalizedHttpException | if access is not allowed |
Definition at line 332 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::checkHasContent | ( | ) |
LocalizedHttpException | if no content is available |
Definition at line 347 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::constructMetadata | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 245 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getContent | ( | ) |
LocalizedHttpException | slot content is not TextContent or RevisionRecord/Slot is inaccessible |
Definition at line 158 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getDefaultSystemMessage | ( | ) |
Definition at line 323 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getETag | ( | ) |
Returns an ETag representing a page's source.
The ETag assumes a page's source has changed if the latest revision of a page has been made private, un-readable for another reason, or a newer revision exists.
Definition at line 207 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getLastModified | ( | ) |
Definition at line 221 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getPage | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 105 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getPageIdentity | ( | ) |
Definition at line 116 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getParamSettings | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 278 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getRole | ( | ) |
Definition at line 150 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getTargetRevision | ( | ) |
Returns the target revision.
No permission checks are applied.
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 137 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::getTitleText | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 98 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::hasContent | ( | ) |
Checks whether content exists.
Permission checks are not considered.
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 238 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::init | ( | Authority | $authority, |
array | $parameters ) |
Authority | $authority | |
string[] | $parameters | validated parameters |
Definition at line 90 of file PageContentHelper.php.
References MediaWiki\Rest\Handler\Helper\PageContentHelper\$authority, and MediaWiki\Rest\Handler\Helper\PageContentHelper\$parameters.
MediaWiki\Rest\Handler\Helper\PageContentHelper::isAccessible | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 196 of file PageContentHelper.php.
MediaWiki\Rest\Handler\Helper\PageContentHelper::setCacheControl | ( | ResponseInterface | $response, |
int | $expiry = null ) |
Sets the 'Cache-Control' header no more then provided $expiry.
ResponseInterface | $response | |
int | null | $expiry |
Reimplemented in MediaWiki\Rest\Handler\Helper\RevisionContentHelper.
Definition at line 298 of file PageContentHelper.php.
References MediaWiki\Rest\ResponseInterface\setHeader().
MediaWiki\Rest\Handler\Helper\PageContentHelper::useDefaultSystemMessage | ( | ) |
If the page is a system message page.
When the content gets overridden to create an actual page, this method returns false.
Definition at line 316 of file PageContentHelper.php.
|
protected |
Definition at line 60 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\init().
|
protected |
Definition at line 54 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\__construct().
|
protected |
Definition at line 57 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\__construct().
|
protected |
Definition at line 69 of file PageContentHelper.php.
|
protected |
Definition at line 63 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\init().
|
protected |
Definition at line 55 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\__construct().
|
protected |
Definition at line 66 of file PageContentHelper.php.
|
protected |
Definition at line 56 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\Helper\PageContentHelper\__construct().
const MediaWiki\Rest\Handler\Helper\PageContentHelper::CONSTRUCTOR_OPTIONS |
Definition at line 49 of file PageContentHelper.php.