MediaWiki REL1_37
|
Public Member Functions | |
__construct (Config $config, RevisionLookup $revisionLookup, TitleFormatter $titleFormatter, PageLookup $pageLookup) | |
checkAccess () | |
constructMetadata () | |
getContent () | |
getETag () | |
Returns an ETag representing a page's source. | |
getLastModified () | |
getPage () | |
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. | |
Protected Attributes | |
Authority null | $authority = null |
Config | $config |
PageLookup | $pageLookup |
ExistingPageRecord false null | $pageRecord = false |
string[] | $parameters = null |
RevisionLookup | $revisionLookup |
RevisionRecord false null | $targetRevision = false |
TitleFormatter | $titleFormatter |
Private Attributes | |
const | MAX_AGE_200 = 5 |
Definition at line 25 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::__construct | ( | Config | $config, |
RevisionLookup | $revisionLookup, | ||
TitleFormatter | $titleFormatter, | ||
PageLookup | $pageLookup | ||
) |
Config | $config | |
RevisionLookup | $revisionLookup | |
TitleFormatter | $titleFormatter | |
PageLookup | $pageLookup |
Definition at line 58 of file PageContentHelper.php.
References MediaWiki\Rest\Handler\PageContentHelper\$config, MediaWiki\Rest\Handler\PageContentHelper\$pageLookup, MediaWiki\Rest\Handler\PageContentHelper\$revisionLookup, and MediaWiki\Rest\Handler\PageContentHelper\$titleFormatter.
MediaWiki\Rest\Handler\PageContentHelper::checkAccess | ( | ) |
LocalizedHttpException | if the content is not accessible |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 267 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::constructMetadata | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 213 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getContent | ( | ) |
LocalizedHttpException | slot content is not TextContent or RevisionRecord/Slot is inaccessible |
Definition at line 126 of file PageContentHelper.php.
MediaWiki\Rest\Handler\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 175 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getLastModified | ( | ) |
Definition at line 189 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getPage | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 89 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getParamSettings | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 237 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getRole | ( | ) |
Definition at line 118 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getTargetRevision | ( | ) |
Returns the target revision.
No permission checks are applied.
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 105 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::getTitleText | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 82 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::hasContent | ( | ) |
Checks whether content exists.
Permission checks are not considered.
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 206 of file PageContentHelper.php.
MediaWiki\Rest\Handler\PageContentHelper::init | ( | Authority | $authority, |
array | $parameters | ||
) |
Authority | $authority | |
string[] | $parameters | validated parameters |
Definition at line 74 of file PageContentHelper.php.
References MediaWiki\Rest\Handler\PageContentHelper\$authority, and MediaWiki\Rest\Handler\PageContentHelper\$parameters.
MediaWiki\Rest\Handler\PageContentHelper::isAccessible | ( | ) |
Reimplemented in MediaWiki\Rest\Handler\RevisionContentHelper.
Definition at line 164 of file PageContentHelper.php.
MediaWiki\Rest\Handler\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\RevisionContentHelper.
Definition at line 252 of file PageContentHelper.php.
References MediaWiki\Rest\ResponseInterface\setHeader().
|
protected |
Definition at line 41 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\init().
|
protected |
Definition at line 29 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\__construct().
|
protected |
Definition at line 38 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\__construct().
|
protected |
Definition at line 50 of file PageContentHelper.php.
|
protected |
Definition at line 44 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\init().
|
protected |
Definition at line 32 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\__construct().
|
protected |
Definition at line 47 of file PageContentHelper.php.
|
protected |
Definition at line 35 of file PageContentHelper.php.
Referenced by MediaWiki\Rest\Handler\PageContentHelper\__construct().
|
private |
Definition at line 26 of file PageContentHelper.php.