MessageIndex Class Reference

Creates a database of keys in all groups, so that namespace and key can be used to get the groups they belong to. More...

Inheritance diagram for MessageIndex:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 retrieve ()

Static Public Member Functions

static singleton ()
static getGroupIds (MessageHandle $handle)
 Retrieves a list of groups given MessageHandle belongs to.
static getPrimaryGroupId (MessageHandle $handle)

Protected Member Functions

 get ($key)
 Looks up the stored value for single key.
 store (array $array)
 clearMessageGroupStats (array $old, array $new)
 Purge message group stats when set of keys have changed.
 checkAndAdd (&$hugearray, MessageGroup $g, $ignore=false)
 serialize ($data)
 unserialize ($data)

Static Protected Attributes

static $instance

Detailed Description

Creates a database of keys in all groups, so that namespace and key can be used to get the groups they belong to.

This is used as a fallback when loadgroup parameter is not provided in the request, which happens if someone reaches a messages from somewhere else than Special:Translate. Also used by Special:TranslationStats and alike which need to map lots of titles to message groups.

Definition at line 19 of file MessageIndex.php.


Member Function Documentation

MessageIndex::checkAndAdd ( &$  hugearray,
MessageGroup g,
ignore = false 
) [protected]
Parameters:
array $hugearray
MessageGroup $g
bool $ignore

Definition at line 184 of file MessageIndex.php.

Here is the call graph for this function:

MessageIndex::clearMessageGroupStats ( array $  old,
array $  new 
) [protected]

Purge message group stats when set of keys have changed.

Parameters:
array $old
array $new

Definition at line 138 of file MessageIndex.php.

Here is the call graph for this function:

MessageIndex::get ( key  )  [protected]

Looks up the stored value for single key.

Only for testing.

Since:
2012-04-10
Parameters:
string $key
Returns:
string|array|null

Reimplemented in TestableDatabaseMessageIndex, TestableCDBMessageIndex, TestableSerializedMessageIndex, DatabaseMessageIndex, and CDBMessageIndex.

Definition at line 73 of file MessageIndex.php.

Here is the call graph for this function:

static MessageIndex::getGroupIds ( MessageHandle handle  )  [static]

Retrieves a list of groups given MessageHandle belongs to.

Since:
2012-01-04
Parameters:
MessageHandle $handle
Returns:
array

Definition at line 43 of file MessageIndex.php.

Referenced by getPrimaryGroupId().

Here is the call graph for this function:

static MessageIndex::getPrimaryGroupId ( MessageHandle handle  )  [static]
MessageIndex::retrieve (  )  [abstract]
Returns:
array

Reimplemented in SerializedMessageIndex, DatabaseMessageIndex, CachedMessageIndex, and CDBMessageIndex.

Referenced by get().

MessageIndex::serialize ( data  )  [protected]
static MessageIndex::singleton (  )  [static]
MessageIndex::store ( array $  array  )  [abstract, protected]
MessageIndex::unserialize ( data  )  [protected]

Member Data Documentation

MessageIndex::$instance [static, protected]

Definition at line 21 of file MessageIndex.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:50 2013 for MediaWiki Translate Extension by  doxygen 1.6.3