MediaWiki  master
Parser\Parsoid\Config\PageConfig Class Reference

Page-level configuration interface for Parsoid. More...

Inheritance diagram for Parser\Parsoid\Config\PageConfig:
Collaboration diagram for Parser\Parsoid\Config\PageConfig:

Public Member Functions

 __construct (ParserOptions $parserOptions, SlotRoleHandler $slotRoleHandler, Title $title, ?RevisionRecord $revision=null, ?string $pagelanguage=null, ?string $pagelanguageDir=null)
 
 fetchRevisionRecordOfTemplate (Title $title)
 Use ParserOptions::getTemplateCallback() to fetch the correct (usually latest) RevisionRecord for the given title. More...
 
 getContentModel ()
 Get content model. More...
 
 getNs ()
 
 getPageId ()
 
 getPageLanguage ()
 
 getPageLanguageDir ()
 
 getParentRevisionId ()
 
 getParserOptions ()
 
 getRevisionContent ()
 
 getRevisionId ()
 
 getRevisionSha1 ()
 
 getRevisionSize ()
 
 getRevisionTimestamp ()
 
 getRevisionUser ()
 
 getRevisionUserId ()
 
 getTitle ()
 
 hasLintableContentModel ()
 

Detailed Description

Page-level configuration interface for Parsoid.

Todo:
We should probably deprecate ParserOptions somehow, using a version of this directly instead.
Since
1.39

Definition at line 39 of file PageConfig.php.

Constructor & Destructor Documentation

◆ __construct()

Parser\Parsoid\Config\PageConfig::__construct ( ParserOptions  $parserOptions,
SlotRoleHandler  $slotRoleHandler,
Title  $title,
?RevisionRecord  $revision = null,
?string  $pagelanguage = null,
?string  $pagelanguageDir = null 
)
Parameters
ParserOptions$parserOptions
SlotRoleHandler$slotRoleHandler
Title$titleTitle being parsed
?RevisionRecord$revision
?string$pagelanguage
?string$pagelanguageDir

Definition at line 67 of file PageConfig.php.

References $title.

Member Function Documentation

◆ fetchRevisionRecordOfTemplate()

Parser\Parsoid\Config\PageConfig::fetchRevisionRecordOfTemplate ( Title  $title)

Use ParserOptions::getTemplateCallback() to fetch the correct (usually latest) RevisionRecord for the given title.

Parameters
Title$title
Returns
?RevisionRecord

Definition at line 165 of file PageConfig.php.

◆ getContentModel()

Parser\Parsoid\Config\PageConfig::getContentModel ( )

Get content model.

Returns
string

Definition at line 87 of file PageConfig.php.

References $content, and MediaWiki\Revision\SlotRecord\MAIN.

◆ getNs()

Parser\Parsoid\Config\PageConfig::getNs ( )

Definition at line 118 of file PageConfig.php.

◆ getPageId()

Parser\Parsoid\Config\PageConfig::getPageId ( )

Definition at line 123 of file PageConfig.php.

◆ getPageLanguage()

Parser\Parsoid\Config\PageConfig::getPageLanguage ( )

Definition at line 128 of file PageConfig.php.

◆ getPageLanguageDir()

Parser\Parsoid\Config\PageConfig::getPageLanguageDir ( )

Definition at line 146 of file PageConfig.php.

◆ getParentRevisionId()

Parser\Parsoid\Config\PageConfig::getParentRevisionId ( )

Definition at line 188 of file PageConfig.php.

◆ getParserOptions()

Parser\Parsoid\Config\PageConfig::getParserOptions ( )
Returns
ParserOptions

Definition at line 154 of file PageConfig.php.

◆ getRevisionContent()

Parser\Parsoid\Config\PageConfig::getRevisionContent ( )

Definition at line 232 of file PageConfig.php.

◆ getRevisionId()

Parser\Parsoid\Config\PageConfig::getRevisionId ( )

Definition at line 182 of file PageConfig.php.

◆ getRevisionSha1()

Parser\Parsoid\Config\PageConfig::getRevisionSha1 ( )

Definition at line 214 of file PageConfig.php.

◆ getRevisionSize()

Parser\Parsoid\Config\PageConfig::getRevisionSize ( )

Definition at line 226 of file PageConfig.php.

◆ getRevisionTimestamp()

Parser\Parsoid\Config\PageConfig::getRevisionTimestamp ( )

Definition at line 194 of file PageConfig.php.

◆ getRevisionUser()

Parser\Parsoid\Config\PageConfig::getRevisionUser ( )

Definition at line 200 of file PageConfig.php.

◆ getRevisionUserId()

Parser\Parsoid\Config\PageConfig::getRevisionUserId ( )

Definition at line 207 of file PageConfig.php.

◆ getTitle()

Parser\Parsoid\Config\PageConfig::getTitle ( )

Definition at line 113 of file PageConfig.php.

◆ hasLintableContentModel()

Parser\Parsoid\Config\PageConfig::hasLintableContentModel ( )

Definition at line 105 of file PageConfig.php.


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