MediaWiki REL1_37
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 17 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 164 of file RevisionContentHelper.php.

◆ constructMetadata()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 101 of file RevisionContentHelper.php.

◆ getPage()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 39 of file RevisionContentHelper.php.

◆ getParamSettings()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 151 of file RevisionContentHelper.php.

◆ getRevisionId()

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

Definition at line 22 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 47 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 29 of file RevisionContentHelper.php.

◆ hasContent()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 83 of file RevisionContentHelper.php.

◆ isAccessible()

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

Reimplemented from MediaWiki\Rest\Handler\PageContentHelper.

Definition at line 62 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 87 of file RevisionContentHelper.php.


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