MediaWiki 1.40.4
MediaWiki\Parser\MagicWordFactory Class Reference

A factory that stores information about MagicWords, and creates them on demand with caching. More...

Public Member Functions

 __construct (Language $contLang, HookContainer $hookContainer)
 #-
 
 get ( $id)
 Factory: creates an object representing an ID.
 
 getCacheTTL ( $id)
 Allow external reads of TTL array.
 
 getContentLanguage ()
 
 getDoubleUnderscoreArray ()
 Get a MagicWordArray of double-underscore entities.
 
 getSubstIDs ()
 Get an array of parser substitution modifier IDs.
 
 getVariableIDs ()
 Get an array of parser variable IDs.
 
 newArray (array $names=[])
 Get a new MagicWordArray with provided $names.
 

Detailed Description

A factory that stores information about MagicWords, and creates them on demand with caching.

Possible future improvements:

  • Simultaneous searching for a number of magic words
  • $mObjects in shared memory
Since
1.32

Definition at line 40 of file MagicWordFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\MagicWordFactory::__construct ( Language $contLang,
HookContainer $hookContainer )

#-

Parameters
Language$contLangContent language
HookContainer$hookContainer

Definition at line 215 of file MagicWordFactory.php.

Member Function Documentation

◆ get()

MediaWiki\Parser\MagicWordFactory::get ( $id)

Factory: creates an object representing an ID.

Parameters
string$idThe internal name of the magic word
Returns
MagicWord

Definition at line 231 of file MagicWordFactory.php.

◆ getCacheTTL()

MediaWiki\Parser\MagicWordFactory::getCacheTTL ( $id)

Allow external reads of TTL array.

Parameters
string$id
Returns
int

Definition at line 269 of file MagicWordFactory.php.

◆ getContentLanguage()

MediaWiki\Parser\MagicWordFactory::getContentLanguage ( )

Definition at line 220 of file MagicWordFactory.php.

◆ getDoubleUnderscoreArray()

MediaWiki\Parser\MagicWordFactory::getDoubleUnderscoreArray ( )

Get a MagicWordArray of double-underscore entities.

Returns
MagicWordArray

Definition at line 282 of file MagicWordFactory.php.

References MediaWiki\Parser\MagicWordFactory\newArray().

◆ getSubstIDs()

MediaWiki\Parser\MagicWordFactory::getSubstIDs ( )

Get an array of parser substitution modifier IDs.

Returns
string[]

Definition at line 259 of file MagicWordFactory.php.

◆ getVariableIDs()

MediaWiki\Parser\MagicWordFactory::getVariableIDs ( )

Get an array of parser variable IDs.

Returns
string[]

Definition at line 245 of file MagicWordFactory.php.

◆ newArray()

MediaWiki\Parser\MagicWordFactory::newArray ( array $names = [])

Get a new MagicWordArray with provided $names.

Parameters
array$names
Returns
MagicWordArray

Definition at line 296 of file MagicWordFactory.php.

Referenced by MediaWiki\Parser\MagicWordFactory\getDoubleUnderscoreArray().


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