WikiLambda
MediaWiki WikiLambda extension
Loading...
Searching...
No Matches
MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry Class Reference
+ Inheritance diagram for MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry:

Public Member Functions

 register (string $zid, string $value)
 Utility method to cache a key value in a registry instance, where the key is the Zid of the cached ZObject.
 
 unregister (string $zid)
 Utility method to remove a given Zid from a registry instance.
 
 clear ()
 Utility method to clear the whole cache of a registry instance and set it to initial values.
 
 isZidCached (string $zid)
 Utility method to check if the given Zid is cached in the registry.
 

Static Public Member Functions

static singleton ()
 
static unregisterZid (string $zid)
 Unregisters the zid from any of the existing registry instances.
 
static clearAll ()
 Clears and re-initializes all existing registry instances.
 

Protected Member Functions

 initialize ()
 Initialize method, to be implemented by every registry class.
 

Protected Attributes

 $registry = []
 
 $type
 

Member Function Documentation

◆ initialize()

MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry::initialize ( )
abstractprotected

◆ isZidCached()

MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry::isZidCached ( string $zid)

Utility method to check if the given Zid is cached in the registry.

Parameters
string$zid
Returns
bool

◆ register()

MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry::register ( string $zid,
string $value )

Utility method to cache a key value in a registry instance, where the key is the Zid of the cached ZObject.

(E.g. a ZLangRegistry will register the ZLanguage Zid and the language code string as its value)

Parameters
string$zid
string$value

Reimplemented in MediaWiki\Extension\WikiLambda\Registry\ZTypeRegistry.

◆ unregister()

MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry::unregister ( string $zid)

Utility method to remove a given Zid from a registry instance.

Parameters
string$zid

Reimplemented in MediaWiki\Extension\WikiLambda\Registry\ZTypeRegistry.

◆ unregisterZid()

static MediaWiki\Extension\WikiLambda\Registry\ZObjectRegistry::unregisterZid ( string $zid)
static

Unregisters the zid from any of the existing registry instances.

Parameters
string$zid

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