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

Public Member Functions

 __construct (ServiceOptions $options, RevisionLookup $revisionLookup, RevisionRenderer $revisionRenderer, TitleFormatter $titleFormatter, PageLookup $pageLookup, ParsoidOutputStash $parsoidOutputStash, StatsdDataFactoryInterface $statsDataFactory, ParserOutputAccess $parserOutputAccess, ParsoidSiteConfig $parsoidSiteConfig, HtmlTransformFactory $htmlTransformFactory, IContentHandlerFactory $contentHandlerFactory, LanguageFactory $languageFactory, RedirectStore $redirectStore, LanguageConverterFactory $languageConverterFactory, TitleFactory $titleFactory, IConnectionProvider $dbProvider, ChangeTagsStore $changeTagStore, StatsFactory $statsFactory)
 
 newHtmlInputTransformHelper ( $envOptions=[], ?PageIdentity $page=null, $body=null, array $parameters=[], ?RevisionRecord $originalRevision=null, ?Bcp47Code $pageLanguage=null)
 
 newHtmlMessageOutputHelper (?PageIdentity $page=null)
 
 newHtmlOutputRendererHelper ( $page=null, array $parameters=[], ?Authority $authority=null, $revision=null, bool $lenientRevHandling=false, ?ParserOptions $parserOptions=null)
 Should we ignore page id mismatches between page and revision objects in HTML/pagebundle requests? Mismatches arise because of page moves.
 
 newPageContentHelper ()
 
 newPageRedirectHelper (ResponseFactory $responseFactory, Router $router, string $route, RequestInterface $request)
 
 newRevisionContentHelper ()
 

Public Attributes

const CONSTRUCTOR_OPTIONS = PageContentHelper::CONSTRUCTOR_OPTIONS
 

Detailed Description

Since
1.40 Factory for helper objects designed for sharing logic between REST handlers that deal with page content.
Stability: unstable
during Parsoid migration

Definition at line 36 of file PageRestHelperFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::__construct ( ServiceOptions $options,
RevisionLookup $revisionLookup,
RevisionRenderer $revisionRenderer,
TitleFormatter $titleFormatter,
PageLookup $pageLookup,
ParsoidOutputStash $parsoidOutputStash,
StatsdDataFactoryInterface $statsDataFactory,
ParserOutputAccess $parserOutputAccess,
ParsoidSiteConfig $parsoidSiteConfig,
HtmlTransformFactory $htmlTransformFactory,
IContentHandlerFactory $contentHandlerFactory,
LanguageFactory $languageFactory,
RedirectStore $redirectStore,
LanguageConverterFactory $languageConverterFactory,
TitleFactory $titleFactory,
IConnectionProvider $dbProvider,
ChangeTagsStore $changeTagStore,
StatsFactory $statsFactory )

Definition at line 62 of file PageRestHelperFactory.php.

Member Function Documentation

◆ newHtmlInputTransformHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newHtmlInputTransformHelper ( $envOptions = [],
?PageIdentity $page = null,
$body = null,
array $parameters = [],
?RevisionRecord $originalRevision = null,
?Bcp47Code $pageLanguage = null )

Definition at line 194 of file PageRestHelperFactory.php.

References wfDeprecated().

◆ newHtmlMessageOutputHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newHtmlMessageOutputHelper ( ?PageIdentity $page = null)
Note
Since 1.43, passing a null $page is deprecated.

Definition at line 187 of file PageRestHelperFactory.php.

References wfDeprecated().

◆ newHtmlOutputRendererHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newHtmlOutputRendererHelper ( $page = null,
array $parameters = [],
?Authority $authority = null,
$revision = null,
bool $lenientRevHandling = false,
?ParserOptions $parserOptions = null )

Should we ignore page id mismatches between page and revision objects in HTML/pagebundle requests? Mismatches arise because of page moves.

This is recommended only for handling calls to internal APIs.

Note
Since 1.43, passing 'null' for $page has been deprecated.
Since 1.43, passing 'null' for $authority has been deprecated.
Since 1.43, passing $lenientRevHandling as the first parameter has been deprecated.
Parameters
bool | PageIdentity | null$pageIf false, this argument is used as the value for $lenientRevHandling, for backward-compatibility.
array$parameters
?Authority$authority
int | RevisionRecord | null$revision
bool$lenientRevHandling
ParserOptions | null$parserOptions
Returns
HtmlOutputRendererHelper

Definition at line 144 of file PageRestHelperFactory.php.

References wfDeprecated().

◆ newPageContentHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newPageContentHelper ( )

◆ newPageRedirectHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newPageRedirectHelper ( ResponseFactory $responseFactory,
Router $router,
string $route,
RequestInterface $request )
Since
1.41

Definition at line 224 of file PageRestHelperFactory.php.

◆ newRevisionContentHelper()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::newRevisionContentHelper ( )

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::CONSTRUCTOR_OPTIONS = PageContentHelper::CONSTRUCTOR_OPTIONS
Access: internal

Definition at line 41 of file PageRestHelperFactory.php.


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