MediaWiki REL1_39
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 37 of file MagicWordFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MagicWordFactory::__construct ( Language $contLang,
HookContainer $hookContainer )

#-

Parameters
Language$contLangContent language
HookContainer$hookContainer

Definition at line 212 of file MagicWordFactory.php.

Member Function Documentation

◆ get()

MagicWordFactory::get ( $id)

Factory: creates an object representing an ID.

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

Definition at line 228 of file MagicWordFactory.php.

◆ getCacheTTL()

MagicWordFactory::getCacheTTL ( $id)

Allow external reads of TTL array.

Parameters
string$id
Returns
int

Definition at line 266 of file MagicWordFactory.php.

◆ getContentLanguage()

MagicWordFactory::getContentLanguage ( )

Definition at line 217 of file MagicWordFactory.php.

◆ getDoubleUnderscoreArray()

MagicWordFactory::getDoubleUnderscoreArray ( )

Get a MagicWordArray of double-underscore entities.

Returns
MagicWordArray

Definition at line 279 of file MagicWordFactory.php.

References newArray().

◆ getSubstIDs()

MagicWordFactory::getSubstIDs ( )

Get an array of parser substitution modifier IDs.

Returns
string[]

Definition at line 256 of file MagicWordFactory.php.

◆ getVariableIDs()

MagicWordFactory::getVariableIDs ( )

Get an array of parser variable IDs.

Returns
string[]

Definition at line 242 of file MagicWordFactory.php.

◆ newArray()

MagicWordFactory::newArray ( array $names = [])

Get a new MagicWordArray with provided $names.

Parameters
array$names
Returns
MagicWordArray

Definition at line 293 of file MagicWordFactory.php.

Referenced by getDoubleUnderscoreArray().


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