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

Public Member Functions

 __construct (ServiceOptions $options, RevisionLookup $revisionLookup, TitleFormatter $titleFormatter, PageLookup $pageLookup, ParsoidOutputStash $parsoidOutputStash, StatsdDataFactoryInterface $statsDataFactory, ParserOutputAccess $parserOutputAccess, ParsoidSiteConfig $parsoidSiteConfig, ParsoidParserFactory $parsoidParserFactory, HtmlTransformFactory $htmlTransformFactory, IContentHandlerFactory $contentHandlerFactory, LanguageFactory $languageFactory, RedirectStore $redirectStore, LanguageConverterFactory $languageConverterFactory)
 
 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)
 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 31 of file PageRestHelperFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Handler\Helper\PageRestHelperFactory::__construct ( ServiceOptions $options,
RevisionLookup $revisionLookup,
TitleFormatter $titleFormatter,
PageLookup $pageLookup,
ParsoidOutputStash $parsoidOutputStash,
StatsdDataFactoryInterface $statsDataFactory,
ParserOutputAccess $parserOutputAccess,
ParsoidSiteConfig $parsoidSiteConfig,
ParsoidParserFactory $parsoidParserFactory,
HtmlTransformFactory $htmlTransformFactory,
IContentHandlerFactory $contentHandlerFactory,
LanguageFactory $languageFactory,
RedirectStore $redirectStore,
LanguageConverterFactory $languageConverterFactory )
Parameters
ServiceOptions$options
RevisionLookup$revisionLookup
TitleFormatter$titleFormatter
PageLookup$pageLookup
ParsoidOutputStash$parsoidOutputStash
StatsdDataFactoryInterface$statsDataFactory
ParserOutputAccess$parserOutputAccess
ParsoidSiteConfig$parsoidSiteConfig
ParsoidParserFactory$parsoidParserFactory
HtmlTransformFactory$htmlTransformFactory
IContentHandlerFactory$contentHandlerFactory
LanguageFactory$languageFactory
RedirectStore$redirectStore
LanguageConverterFactory$languageConverterFactory

Definition at line 69 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 183 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 176 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 )

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

Definition at line 135 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 213 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 36 of file PageRestHelperFactory.php.


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