MediaWiki  master
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)
 #- More...
 
 get ( $id)
 Factory: creates an object representing an ID. More...
 
 getCacheTTL ( $id)
 Allow external reads of TTL array. More...
 
 getContentLanguage ()
 
 getDoubleUnderscoreArray ()
 Get a MagicWordArray of double-underscore entities. More...
 
 getSubstIDs ()
 Get an array of parser substitution modifier IDs. More...
 
 getVariableIDs ()
 Get an array of parser variable IDs. More...
 
 newArray (array $names=[])
 Get a new MagicWordArray with provided $names. More...
 

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()

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

#-

Parameters
Language$contLangContent language
HookContainer$hookContainer

Definition at line 171 of file MagicWordFactory.php.

Member Function Documentation

◆ get()

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 187 of file MagicWordFactory.php.

◆ getCacheTTL()

Parser\MagicWordFactory::getCacheTTL (   $id)

Allow external reads of TTL array.

Parameters
string$id
Returns
int
Deprecated:
Since 1.40

Definition at line 226 of file MagicWordFactory.php.

◆ getContentLanguage()

Parser\MagicWordFactory::getContentLanguage ( )

Definition at line 176 of file MagicWordFactory.php.

◆ getDoubleUnderscoreArray()

Parser\MagicWordFactory::getDoubleUnderscoreArray ( )

Get a MagicWordArray of double-underscore entities.

Returns
MagicWordArray

Definition at line 235 of file MagicWordFactory.php.

References Parser\MagicWordFactory\newArray().

◆ getSubstIDs()

Parser\MagicWordFactory::getSubstIDs ( )

Get an array of parser substitution modifier IDs.

Returns
string[]

Definition at line 215 of file MagicWordFactory.php.

◆ getVariableIDs()

Parser\MagicWordFactory::getVariableIDs ( )

Get an array of parser variable IDs.

Returns
string[]

Definition at line 201 of file MagicWordFactory.php.

◆ newArray()

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

Get a new MagicWordArray with provided $names.

Parameters
array$names
Returns
MagicWordArray

Definition at line 249 of file MagicWordFactory.php.

Referenced by Parser\MagicWordFactory\getDoubleUnderscoreArray().


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