MediaWiki  master
Parser\Parsoid\Config\SiteConfig Class Reference

Site-level configuration for Parsoid. More...

Inheritance diagram for Parser\Parsoid\Config\SiteConfig:
Collaboration diagram for 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, 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. More...
 
 specialPageLocalName (string $alias)
 
 timezoneOffset ()
 
 ucfirst (string $str)
 
 variants ()
 
 widthOption ()
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

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. More...
 

Detailed Description

Site-level configuration for Parsoid.

This includes both global configuration and wiki-level configuration.

Since
1.39

Definition at line 63 of file SiteConfig.php.

Constructor & Destructor Documentation

◆ __construct()

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,
Parser  $parser,
Config  $optionalConfig 
)
Parameters
ServiceOptions$configMediaWiki main configuration object
array$parsoidSettingsParsoid-specific options array from main configuration.
ObjectFactory$objectFactory
Language$contentLanguageContent language.
StatsdDataFactoryInterface$stats
MagicWordFactory$magicWordFactory
NamespaceInfo$namespaceInfo
SpecialPageFactory$specialPageFactory
InterwikiLookup$interwikiLookup
UserOptionsLookup$userOptionsLookup
LanguageFactory$languageFactory
LanguageConverterFactory$languageConverterFactory
LanguageNameUtils$languageNameUtils
Parser$parser
Config$optionalConfig

Definition at line 172 of file SiteConfig.php.

References ExtensionRegistry\getInstance().

Member Function Documentation

◆ allowedExternalImagePrefixes()

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

Definition at line 268 of file SiteConfig.php.

◆ baseURI()

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

Definition at line 316 of file SiteConfig.php.

◆ bswRegexp()

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

Definition at line 365 of file SiteConfig.php.

◆ canonicalNamespaceId()

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

Definition at line 375 of file SiteConfig.php.

◆ categoryRegexp()

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

Definition at line 351 of file SiteConfig.php.

References NS_CATEGORY.

◆ exportMetadataToHead()

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

Definition at line 557 of file SiteConfig.php.

◆ galleryOptions()

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

Definition at line 264 of file SiteConfig.php.

◆ getExternalLinkTarget()

Parser\Parsoid\Config\SiteConfig::getExternalLinkTarget ( )
Returns
string|false

Definition at line 742 of file SiteConfig.php.

◆ getFunctionSynonyms()

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

Definition at line 630 of file SiteConfig.php.

◆ getLogger()

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

Definition at line 239 of file SiteConfig.php.

References MediaWiki\Logger\LoggerFactory\getInstance().

◆ getMagicWordMatcher()

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

Definition at line 640 of file SiteConfig.php.

◆ getMagicWords()

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

Definition at line 635 of file SiteConfig.php.

◆ getMaxTemplateDepth()

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

Definition at line 678 of file SiteConfig.php.

◆ getNoFollowConfig()

Parser\Parsoid\Config\SiteConfig::getNoFollowConfig ( )
Returns
array

Definition at line 733 of file SiteConfig.php.

◆ getNonNativeExtensionTags()

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

Definition at line 670 of file SiteConfig.php.

◆ getObjectFactory()

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

Definition at line 234 of file SiteConfig.php.

◆ getParameterizedAliasMatcher()

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

Definition at line 645 of file SiteConfig.php.

◆ getProtocols()

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

Definition at line 728 of file SiteConfig.php.

◆ getSpecialNSAliases()

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

Definition at line 702 of file SiteConfig.php.

References NS_SPECIAL.

◆ getSpecialPageAliases()

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

Definition at line 721 of file SiteConfig.php.

◆ getVariableIDs()

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

Definition at line 625 of file SiteConfig.php.

◆ interwikiMagic()

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

Definition at line 418 of file SiteConfig.php.

◆ interwikiMap()

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

Definition at line 422 of file SiteConfig.php.

◆ iwp()

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

Definition at line 483 of file SiteConfig.php.

◆ lang()

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

Definition at line 503 of file SiteConfig.php.

◆ langConverterEnabled()

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

Definition at line 527 of file SiteConfig.php.

◆ legalTitleChars()

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

Definition at line 487 of file SiteConfig.php.

◆ linkPrefixRegex()

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

Definition at line 491 of file SiteConfig.php.

◆ linkTrail()

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

Definition at line 499 of file SiteConfig.php.

◆ mainpage()

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

Definition at line 507 of file SiteConfig.php.

◆ metrics()

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

Definition at line 247 of file SiteConfig.php.

◆ namespaceCase()

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

Definition at line 398 of file SiteConfig.php.

◆ namespaceHasSubpages()

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

Definition at line 393 of file SiteConfig.php.

◆ namespaceId()

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

Definition at line 381 of file SiteConfig.php.

◆ namespaceIsTalk()

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

Definition at line 403 of file SiteConfig.php.

◆ namespaceName()

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

Definition at line 387 of file SiteConfig.php.

◆ nativeGalleryEnabled()

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

Definition at line 260 of file SiteConfig.php.

◆ redirectRegexp()

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

Definition at line 346 of file SiteConfig.php.

◆ relativeLinkPrefix()

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

Definition at line 323 of file SiteConfig.php.

◆ responsiveReferences()

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

Definition at line 512 of file SiteConfig.php.

◆ rtl()

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

Definition at line 522 of file SiteConfig.php.

◆ script()

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

Definition at line 544 of file SiteConfig.php.

◆ scriptpath()

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

Definition at line 548 of file SiteConfig.php.

◆ server()

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

Definition at line 552 of file SiteConfig.php.

◆ setMaxTemplateDepth()

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

Overrides the max template depth in the MediaWiki configuration.

Parameters
int$depth

Definition at line 686 of file SiteConfig.php.

◆ specialPageLocalName()

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

Definition at line 413 of file SiteConfig.php.

◆ timezoneOffset()

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

Definition at line 579 of file SiteConfig.php.

◆ ucfirst()

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

Definition at line 408 of file SiteConfig.php.

◆ variants()

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

Definition at line 583 of file SiteConfig.php.

◆ widthOption()

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

Definition at line 617 of file SiteConfig.php.

Member Data Documentation

◆ COMMENT_REGEXP_FRAGMENT

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

Regular expression fragment for matching wikitext comments.

Meant for inclusion in other regular expressions.

Definition at line 69 of file SiteConfig.php.

◆ CONSTRUCTOR_OPTIONS

const 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 71 of file SiteConfig.php.


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