MediaWiki REL1_39
MediaWiki\Rest\Handler\RevisionContentHelper Class Reference
Inheritance diagram for MediaWiki\Rest\Handler\RevisionContentHelper:
Collaboration diagram for MediaWiki\Rest\Handler\RevisionContentHelper:

Public Member Functions

 checkAccess ()
 
 constructMetadata ()
 
 getPage ()
 
 getParamSettings ()
 
 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\PageContentHelper
 __construct (Config $config, RevisionLookup $revisionLookup, TitleFormatter $titleFormatter, PageLookup $pageLookup)
 
 getContent ()
 
 getETag ()
 Returns an ETag representing a page's source.
 
 getLastModified ()
 
 getRole ()
 
 init (Authority $authority, array $parameters)
 

Additional Inherited Members

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

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\RevisionContentHelper::checkAccess ( )
Exceptions
LocalizedHttpExceptionif the content is not accessible

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 168 of file RevisionContentHelper.php.

◆ constructMetadata()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 102 of file RevisionContentHelper.php.

◆ getPage()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 40 of file RevisionContentHelper.php.

◆ getParamSettings()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 155 of file RevisionContentHelper.php.

◆ getRevisionId()

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

Definition at line 23 of file RevisionContentHelper.php.

◆ getTargetRevision()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 48 of file RevisionContentHelper.php.

◆ getTitleText()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 30 of file RevisionContentHelper.php.

◆ hasContent()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 84 of file RevisionContentHelper.php.

◆ isAccessible()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 63 of file RevisionContentHelper.php.

◆ setCacheControl()

MediaWiki\Rest\Handler\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\PageContentHelper.

Definition at line 88 of file RevisionContentHelper.php.


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