MediaWiki REL1_39
MediaWiki\Parser\Parsoid\Config\SiteConfig Class Reference

Site-level configuration for Parsoid. More...

Inheritance diagram for MediaWiki\Parser\Parsoid\Config\SiteConfig:
Collaboration diagram for MediaWiki\Parser\Parsoid\Config\SiteConfig:

Public Member Functions

 __construct (ServiceOptions $config, array $parsoidSettings, ObjectFactory $objectFactory, Language $contentLanguage, StatsdDataFactoryInterface $stats, MagicWordFactory $magicWordFactory, NamespaceInfo $namespaceInfo, SpecialPageFactory $specialPageFactory, InterwikiLookup $interwikiLookup, UserOptionsLookup $userOptionsLookup, LanguageFactory $languageFactory, LanguageConverterFactory $languageConverterFactory, LanguageNameUtils $languageNameUtils, UrlUtils $urlUtils, Parser $parser, Config $optionalConfig)
 allowedExternalImagePrefixes ()
 baseURI ()
 bswRegexp ()
 canonicalNamespaceId (string $name)
 categoryRegexp ()
 exportMetadataToHead (Document $document, ContentMetadataCollector $metadata, string $defaultTitle, string $lang)
 galleryOptions ()
 getExternalLinkTarget ()
 getLogger ()
 getMagicWordMatcher (string $id)
 getMaxTemplateDepth ()
 getNoFollowConfig ()
 getObjectFactory ()
 getParameterizedAliasMatcher (array $words)
 interwikiMagic ()
 interwikiMap ()
 iwp ()
 lang ()
 langConverterEnabled (string $lang)
 legalTitleChars ()
 linkPrefixRegex ()
 mainpage ()
 metrics ()
 namespaceCase (int $ns)
 namespaceHasSubpages (int $ns)
 namespaceId (string $name)
 namespaceIsTalk (int $ns)
 namespaceName (int $ns)
 nativeGalleryEnabled ()
 redirectRegexp ()
 relativeLinkPrefix ()
 responsiveReferences ()
 rtl ()
 script ()
 scriptpath ()
 server ()
 setMaxTemplateDepth (int $depth)
 Overrides the max template depth in the MediaWiki configuration.
 specialPageLocalName (string $alias)
 timezoneOffset ()
 ucfirst (string $str)
 variants ()
 widthOption ()

Public Attributes


Protected Member Functions

 getFunctionSynonyms ()
 getMagicWords ()
 getNonNativeExtensionTags ()
 getProtocols ()
 getSpecialNSAliases ()
 getSpecialPageAliases (string $specialPage)
 getVariableIDs ()
 linkTrail ()

Protected Attributes

const COMMENT_REGEXP_FRAGMENT = '<!--(?>[\s\S]*?-->)'
 Regular expression fragment for matching wikitext comments.

Detailed Description

Site-level configuration for Parsoid.

This includes both global configuration and wiki-level configuration.


Definition at line 64 of file SiteConfig.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\Config\SiteConfig::__construct ( ServiceOptions  $config,
array  $parsoidSettings,
ObjectFactory  $objectFactory,
Language  $contentLanguage,
StatsdDataFactoryInterface  $stats,
MagicWordFactory  $magicWordFactory,
NamespaceInfo  $namespaceInfo,
SpecialPageFactory  $specialPageFactory,
InterwikiLookup  $interwikiLookup,
UserOptionsLookup  $userOptionsLookup,
LanguageFactory  $languageFactory,
LanguageConverterFactory  $languageConverterFactory,
LanguageNameUtils  $languageNameUtils,
UrlUtils  $urlUtils,
Parser  $parser,
Config  $optionalConfig 
ServiceOptions$configMediaWiki main configuration object
array$parsoidSettingsParsoid-specific options array from main configuration.
Language$contentLanguageContent language.

Definition at line 177 of file SiteConfig.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions().

Member Function Documentation

◆ allowedExternalImagePrefixes()

MediaWiki\Parser\Parsoid\Config\SiteConfig::allowedExternalImagePrefixes ( )

Definition at line 275 of file SiteConfig.php.

◆ baseURI()

MediaWiki\Parser\Parsoid\Config\SiteConfig::baseURI ( )

Definition at line 323 of file SiteConfig.php.

◆ bswRegexp()

MediaWiki\Parser\Parsoid\Config\SiteConfig::bswRegexp ( )

Definition at line 372 of file SiteConfig.php.

◆ canonicalNamespaceId()

MediaWiki\Parser\Parsoid\Config\SiteConfig::canonicalNamespaceId ( string  $name)

Definition at line 382 of file SiteConfig.php.

◆ categoryRegexp()

MediaWiki\Parser\Parsoid\Config\SiteConfig::categoryRegexp ( )

Definition at line 358 of file SiteConfig.php.

References NS_CATEGORY.

◆ exportMetadataToHead()

MediaWiki\Parser\Parsoid\Config\SiteConfig::exportMetadataToHead ( Document  $document,
ContentMetadataCollector  $metadata,
string  $defaultTitle,
string  $lang 

Definition at line 564 of file SiteConfig.php.

◆ galleryOptions()

MediaWiki\Parser\Parsoid\Config\SiteConfig::galleryOptions ( )

Definition at line 271 of file SiteConfig.php.

◆ getExternalLinkTarget()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getExternalLinkTarget ( )

Definition at line 749 of file SiteConfig.php.

◆ getFunctionSynonyms()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getFunctionSynonyms ( )

Definition at line 637 of file SiteConfig.php.

◆ getLogger()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getLogger ( )

Definition at line 246 of file SiteConfig.php.

◆ getMagicWordMatcher()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getMagicWordMatcher ( string  $id)

Definition at line 647 of file SiteConfig.php.

◆ getMagicWords()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getMagicWords ( )

Definition at line 642 of file SiteConfig.php.

◆ getMaxTemplateDepth()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getMaxTemplateDepth ( )

Definition at line 685 of file SiteConfig.php.

◆ getNoFollowConfig()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getNoFollowConfig ( )

Definition at line 740 of file SiteConfig.php.

◆ getNonNativeExtensionTags()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getNonNativeExtensionTags ( )

Definition at line 677 of file SiteConfig.php.

◆ getObjectFactory()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getObjectFactory ( )

Definition at line 241 of file SiteConfig.php.

◆ getParameterizedAliasMatcher()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getParameterizedAliasMatcher ( array  $words)

Definition at line 652 of file SiteConfig.php.

◆ getProtocols()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getProtocols ( )

Definition at line 735 of file SiteConfig.php.

◆ getSpecialNSAliases()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getSpecialNSAliases ( )

Definition at line 709 of file SiteConfig.php.

References NS_SPECIAL.

◆ getSpecialPageAliases()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getSpecialPageAliases ( string  $specialPage)

Definition at line 728 of file SiteConfig.php.

◆ getVariableIDs()

MediaWiki\Parser\Parsoid\Config\SiteConfig::getVariableIDs ( )

Definition at line 632 of file SiteConfig.php.

◆ interwikiMagic()

MediaWiki\Parser\Parsoid\Config\SiteConfig::interwikiMagic ( )

Definition at line 425 of file SiteConfig.php.

◆ interwikiMap()

MediaWiki\Parser\Parsoid\Config\SiteConfig::interwikiMap ( )

Definition at line 429 of file SiteConfig.php.

◆ iwp()

MediaWiki\Parser\Parsoid\Config\SiteConfig::iwp ( )

Definition at line 490 of file SiteConfig.php.

◆ lang()

MediaWiki\Parser\Parsoid\Config\SiteConfig::lang ( )

Definition at line 510 of file SiteConfig.php.

◆ langConverterEnabled()

MediaWiki\Parser\Parsoid\Config\SiteConfig::langConverterEnabled ( string  $lang)

Definition at line 534 of file SiteConfig.php.

◆ legalTitleChars()

MediaWiki\Parser\Parsoid\Config\SiteConfig::legalTitleChars ( )

Definition at line 494 of file SiteConfig.php.

◆ linkPrefixRegex()

MediaWiki\Parser\Parsoid\Config\SiteConfig::linkPrefixRegex ( )

Definition at line 498 of file SiteConfig.php.

◆ linkTrail()

MediaWiki\Parser\Parsoid\Config\SiteConfig::linkTrail ( )

Definition at line 506 of file SiteConfig.php.

◆ mainpage()

MediaWiki\Parser\Parsoid\Config\SiteConfig::mainpage ( )

Definition at line 514 of file SiteConfig.php.

◆ metrics()

MediaWiki\Parser\Parsoid\Config\SiteConfig::metrics ( )

Definition at line 254 of file SiteConfig.php.

◆ namespaceCase()

MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceCase ( int  $ns)

Definition at line 405 of file SiteConfig.php.

◆ namespaceHasSubpages()

MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceHasSubpages ( int  $ns)

Definition at line 400 of file SiteConfig.php.

◆ namespaceId()

MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceId ( string  $name)

Definition at line 388 of file SiteConfig.php.

◆ namespaceIsTalk()

MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceIsTalk ( int  $ns)

Definition at line 410 of file SiteConfig.php.

◆ namespaceName()

MediaWiki\Parser\Parsoid\Config\SiteConfig::namespaceName ( int  $ns)

Definition at line 394 of file SiteConfig.php.

◆ nativeGalleryEnabled()

MediaWiki\Parser\Parsoid\Config\SiteConfig::nativeGalleryEnabled ( )

Definition at line 267 of file SiteConfig.php.

◆ redirectRegexp()

MediaWiki\Parser\Parsoid\Config\SiteConfig::redirectRegexp ( )

Definition at line 353 of file SiteConfig.php.

◆ relativeLinkPrefix()

MediaWiki\Parser\Parsoid\Config\SiteConfig::relativeLinkPrefix ( )

Definition at line 330 of file SiteConfig.php.

◆ responsiveReferences()

MediaWiki\Parser\Parsoid\Config\SiteConfig::responsiveReferences ( )

Definition at line 519 of file SiteConfig.php.

◆ rtl()

MediaWiki\Parser\Parsoid\Config\SiteConfig::rtl ( )

Definition at line 529 of file SiteConfig.php.

◆ script()

MediaWiki\Parser\Parsoid\Config\SiteConfig::script ( )

Definition at line 551 of file SiteConfig.php.

◆ scriptpath()

MediaWiki\Parser\Parsoid\Config\SiteConfig::scriptpath ( )

Definition at line 555 of file SiteConfig.php.

◆ server()

MediaWiki\Parser\Parsoid\Config\SiteConfig::server ( )

Definition at line 559 of file SiteConfig.php.

◆ setMaxTemplateDepth()

MediaWiki\Parser\Parsoid\Config\SiteConfig::setMaxTemplateDepth ( int  $depth)

Overrides the max template depth in the MediaWiki configuration.


Definition at line 693 of file SiteConfig.php.

◆ specialPageLocalName()

MediaWiki\Parser\Parsoid\Config\SiteConfig::specialPageLocalName ( string  $alias)

Definition at line 420 of file SiteConfig.php.

◆ timezoneOffset()

MediaWiki\Parser\Parsoid\Config\SiteConfig::timezoneOffset ( )

Definition at line 586 of file SiteConfig.php.

◆ ucfirst()

MediaWiki\Parser\Parsoid\Config\SiteConfig::ucfirst ( string  $str)

Definition at line 415 of file SiteConfig.php.

◆ variants()

MediaWiki\Parser\Parsoid\Config\SiteConfig::variants ( )

Definition at line 590 of file SiteConfig.php.

◆ widthOption()

MediaWiki\Parser\Parsoid\Config\SiteConfig::widthOption ( )

Definition at line 624 of file SiteConfig.php.

Member Data Documentation


const MediaWiki\Parser\Parsoid\Config\SiteConfig::COMMENT_REGEXP_FRAGMENT = '<!--(?>[\s\S]*?-->)'

Regular expression fragment for matching wikitext comments.

Meant for inclusion in other regular expressions.

Definition at line 70 of file SiteConfig.php.


const MediaWiki\Parser\Parsoid\Config\SiteConfig::CONSTRUCTOR_OPTIONS
Initial value:
= [
const ExternalLinkTarget
Name constant for the ExternalLinkTarget setting, for use with Config::get()
const NoFollowDomainExceptions
Name constant for the NoFollowDomainExceptions setting, for use with Config::get()
const NamespaceAliases
Name constant for the NamespaceAliases setting, for use with Config::get()
const Server
Name constant for the Server setting, for use with Config::get()
const NoFollowNsExceptions
Name constant for the NoFollowNsExceptions setting, for use with Config::get()
const AllowExternalImages
Name constant for the AllowExternalImages setting, for use with Config::get()
const UrlProtocols
Name constant for the UrlProtocols setting, for use with Config::get()
const ArticlePath
Name constant for the ArticlePath setting, for use with Config::get()
const LocalTZoffset
Name constant for the LocalTZoffset setting, for use with Config::get()
const MaxTemplateDepth
Name constant for the MaxTemplateDepth setting, for use with Config::get()
const ScriptPath
Name constant for the ScriptPath setting, for use with Config::get()
const GalleryOptions
Name constant for the GalleryOptions setting, for use with Config::get()
const ThumbLimits
Name constant for the ThumbLimits setting, for use with Config::get()
const LanguageCode
Name constant for the LanguageCode setting, for use with Config::get()
const LocalInterwikis
Name constant for the LocalInterwikis setting, for use with Config::get()
const InterwikiMagic
Name constant for the InterwikiMagic setting, for use with Config::get()
const LoadScript
Name constant for the LoadScript setting, for use with Config::get()
const AllowExternalImagesFrom
Name constant for the AllowExternalImagesFrom setting, for use with Config::get()
const NoFollowLinks
Name constant for the NoFollowLinks setting, for use with Config::get()
const Script
Name constant for the Script setting, for use with Config::get()
const ExtraInterlanguageLinkPrefixes
Name constant for the ExtraInterlanguageLinkPrefixes setting, for use with Config::get()

Definition at line 72 of file SiteConfig.php.

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