MediaWiki master
MediaWiki\Parser\MagicWordFactory Class Reference

Store information about magic words, and create/cache MagicWord objects. More...

Public Member Functions

 __construct (Language $contentLanguage, HookContainer $hookContainer)
 
 get ( $id)
 Get a MagicWord object for a given internal ID.
 
 getCacheTTL ( $id)
 Allow external reads of TTL array.
 
 getContentLanguage ()
 
 getDoubleUnderscoreArray ()
 Get a MagicWordArray of double-underscore entities.
 
 getSubstArray ()
 
 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

Store information about magic words, and create/cache MagicWord objects.

See docs/magicword.md.

Possible future improvements:

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

Definition at line 39 of file MagicWordFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\MagicWordFactory::__construct ( Language $contentLanguage,
HookContainer $hookContainer )
Access: internal
For ServiceWiring only

Definition at line 154 of file MagicWordFactory.php.

Member Function Documentation

◆ get()

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

Get a MagicWord object for a given internal ID.

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

Definition at line 169 of file MagicWordFactory.php.

◆ getCacheTTL()

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

Allow external reads of TTL array.

Parameters
string$id
Returns
int
Deprecated
Since 1.40

Definition at line 218 of file MagicWordFactory.php.

◆ getContentLanguage()

MediaWiki\Parser\MagicWordFactory::getContentLanguage ( )

Definition at line 159 of file MagicWordFactory.php.

◆ getDoubleUnderscoreArray()

MediaWiki\Parser\MagicWordFactory::getDoubleUnderscoreArray ( )

Get a MagicWordArray of double-underscore entities.

Returns
MagicWordArray

Definition at line 227 of file MagicWordFactory.php.

◆ getSubstArray()

MediaWiki\Parser\MagicWordFactory::getSubstArray ( )
Access: internal
for use in {
See also
Parser::braceSubstitution} only

Definition at line 207 of file MagicWordFactory.php.

◆ getSubstIDs()

MediaWiki\Parser\MagicWordFactory::getSubstIDs ( )

Get an array of parser substitution modifier IDs.

Returns
string[]
Deprecated
since 1.42, use {
See also
getSubstArray} instead

Definition at line 199 of file MagicWordFactory.php.

◆ getVariableIDs()

MediaWiki\Parser\MagicWordFactory::getVariableIDs ( )

Get an array of parser variable IDs.

Returns
string[]

Definition at line 183 of file MagicWordFactory.php.

◆ newArray()

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

Get a new MagicWordArray with provided $names.

Parameters
string[]$names
Returns
MagicWordArray

Definition at line 241 of file MagicWordFactory.php.


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