MediaWiki master
MediaWiki\Rest\Handler\Helper\RevisionContentHelper Class Reference

Inherits MediaWiki\Rest\Handler\Helper\PageContentHelper.

Collaboration diagram for MediaWiki\Rest\Handler\Helper\RevisionContentHelper:

Public Member Functions

 checkAccess ()
 
 constructMetadata ()
 
 getPage ()
 
 getParamSettings ()
 
 getResponseBodySchema ()
 Returns an OpenAPI schema object describing the structure of the response.
 
 getRevisionId ()
 
 getTargetRevision ()
 
 getTitleText ()
 
 hasContent ()
 
 isAccessible ()
 
 setCacheControl (ResponseInterface $response, int $expiry=null)
 Sets the 'Cache-Control' header no more then provided $expiry.
 
- Public Member Functions inherited from MediaWiki\Rest\Handler\Helper\PageContentHelper
 __construct (ServiceOptions $options, RevisionLookup $revisionLookup, TitleFormatter $titleFormatter, PageLookup $pageLookup, TitleFactory $titleFactory, IConnectionProvider $connectionProvider, ChangeTagsStore $changeTagStore)
 
 checkAccessPermission ()
 
 checkHasContent ()
 
 constructRestbaseCompatibleMetadata ()
 
 getContent ()
 
 getDefaultSystemMessage ()
 
 getETag ()
 Returns an ETag representing a page's source.
 
 getLastModified ()
 
 getPageIdentity ()
 
 getRole ()
 
 init (Authority $authority, array $parameters)
 
 useDefaultSystemMessage ()
 If the page is a system message page.
 

Additional Inherited Members

- Public Attributes inherited from MediaWiki\Rest\Handler\Helper\PageContentHelper
const CONSTRUCTOR_OPTIONS
 
- Protected Attributes inherited from MediaWiki\Rest\Handler\Helper\PageContentHelper
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
 

Detailed Description

Access: internal
for use by core REST infrastructure

Definition at line 18 of file RevisionContentHelper.php.

Member Function Documentation

◆ checkAccess()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::checkAccess ( )
Exceptions
LocalizedHttpExceptionif the content is not accessible

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 248 of file RevisionContentHelper.php.

◆ constructMetadata()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::constructMetadata ( )
Returns
array

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 102 of file RevisionContentHelper.php.

◆ getPage()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getPage ( )
Returns
ExistingPageRecord|null

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 40 of file RevisionContentHelper.php.

◆ getParamSettings()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getParamSettings ( )
Returns
array[]

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 235 of file RevisionContentHelper.php.

◆ getResponseBodySchema()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getResponseBodySchema ( )

Returns an OpenAPI schema object describing the structure of the response.

Returns
array

Definition at line 156 of file RevisionContentHelper.php.

◆ getRevisionId()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getRevisionId ( )
Returns
int|null The ID of the target revision

Definition at line 23 of file RevisionContentHelper.php.

◆ getTargetRevision()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getTargetRevision ( )
Returns
RevisionRecord|null latest revision or null if unable to retrieve revision

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 48 of file RevisionContentHelper.php.

◆ getTitleText()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::getTitleText ( )
Returns
string|null title text or null if unable to retrieve title

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 30 of file RevisionContentHelper.php.

◆ hasContent()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::hasContent ( )
Returns
bool

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 84 of file RevisionContentHelper.php.

◆ isAccessible()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::isAccessible ( )
Returns
bool

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 63 of file RevisionContentHelper.php.

◆ setCacheControl()

MediaWiki\Rest\Handler\Helper\RevisionContentHelper::setCacheControl ( ResponseInterface $response,
int $expiry = null )

Sets the 'Cache-Control' header no more then provided $expiry.

Parameters
ResponseInterface$response
int | null$expiry

Reimplemented from MediaWiki\Rest\Handler\Helper\PageContentHelper.

Definition at line 88 of file RevisionContentHelper.php.


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