Creates a database of keys in all groups, so that namespace and key can be used to get the groups they belong to. More...
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 |
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.
MessageIndex::checkAndAdd | ( | &$ | hugearray, | |
MessageGroup $ | g, | |||
$ | ignore = false | |||
) | [protected] |
array | $hugearray | |
MessageGroup | $g | |
bool | $ignore |
Definition at line 184 of file MessageIndex.php.
MessageIndex::clearMessageGroupStats | ( | array $ | old, | |
array $ | new | |||
) | [protected] |
Purge message group stats when set of keys have changed.
array | $old | |
array | $new |
Definition at line 138 of file MessageIndex.php.
MessageIndex::get | ( | $ | key | ) | [protected] |
Looks up the stored value for single key.
Only for testing.
string | $key |
Reimplemented in TestableDatabaseMessageIndex, TestableCDBMessageIndex, TestableSerializedMessageIndex, DatabaseMessageIndex, and CDBMessageIndex.
Definition at line 73 of file MessageIndex.php.
static MessageIndex::getGroupIds | ( | MessageHandle $ | handle | ) | [static] |
Retrieves a list of groups given MessageHandle belongs to.
MessageHandle | $handle |
Definition at line 43 of file MessageIndex.php.
Referenced by getPrimaryGroupId().
static MessageIndex::getPrimaryGroupId | ( | MessageHandle $ | handle | ) | [static] |
MessageHandle | $handle |
Definition at line 61 of file MessageIndex.php.
Referenced by TranslationHelpers::ajaxEditLink(), TranslationEditPage::execute(), ApiTranslationStash::formatTranslation(), AggregateMessageGroup::getMessage(), SandboxMessageGroup::getMessageContent(), RecentMessageGroup::getMessageContent(), and TranslationHelpers::getMessageGroup().
MessageIndex::retrieve | ( | ) | [abstract] |
Reimplemented in SerializedMessageIndex, DatabaseMessageIndex, CachedMessageIndex, and CDBMessageIndex.
Referenced by get().
MessageIndex::serialize | ( | $ | data | ) | [protected] |
Definition at line 233 of file MessageIndex.php.
Referenced by CDBMessageIndex::store(), DatabaseMessageIndex::store(), and SerializedMessageIndex::store().
static MessageIndex::singleton | ( | ) | [static] |
Definition at line 26 of file MessageIndex.php.
Referenced by CreateMessageIndex::execute(), MessageHandle::figureMessage(), SandboxMessageGroup::getDefinitions(), getGroupIds(), MessageHandle::getGroupIds(), TranslateUtils::messageKeyToGroups(), and MessageIndexRebuildJob::run().
MessageIndex::store | ( | array $ | array | ) | [abstract, protected] |
MessageIndex::unserialize | ( | $ | data | ) | [protected] |
Definition at line 241 of file MessageIndex.php.
Referenced by CDBMessageIndex::get(), DatabaseMessageIndex::get(), CDBMessageIndex::retrieve(), DatabaseMessageIndex::retrieve(), and SerializedMessageIndex::retrieve().
MessageIndex::$instance [static, protected] |
Definition at line 21 of file MessageIndex.php.