diff options
Diffstat (limited to 'includes/MessageBlobStore.php')
-rw-r--r-- | includes/MessageBlobStore.php | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php index c96ea56e..8a8142b7 100644 --- a/includes/MessageBlobStore.php +++ b/includes/MessageBlobStore.php @@ -29,7 +29,7 @@ * A message blob is a JSON object containing the interface messages for a * certain resource in a certain language. These message blobs are cached * in the msg_resource table and automatically invalidated when one of their - * consistuent messages or the resource itself is changed. + * constituent messages or the resource itself is changed. */ class MessageBlobStore { @@ -37,8 +37,8 @@ class MessageBlobStore { * Get the message blobs for a set of modules * * @param $resourceLoader ResourceLoader object - * @param $modules array Array of module objects keyed by module name - * @param $lang string Language code + * @param array $modules Array of module objects keyed by module name + * @param string $lang Language code * @return array An array mapping module names to message blobs */ public static function get( ResourceLoader $resourceLoader, $modules, $lang ) { @@ -68,9 +68,9 @@ class MessageBlobStore { * present, it is not regenerated; instead, the preexisting blob * is fetched and returned. * - * @param $name String: module name + * @param string $name module name * @param $module ResourceLoaderModule object - * @param $lang String: language code + * @param string $lang language code * @return mixed Message blob or false if the module has no messages */ public static function insertMessageBlob( $name, ResourceLoaderModule $module, $lang ) { @@ -125,9 +125,9 @@ class MessageBlobStore { /** * Update the message blob for a given module in a given language * - * @param $name String: module name + * @param string $name module name * @param $module ResourceLoaderModule object - * @param $lang String: language code + * @param string $lang language code * @return String Regenerated message blob, or null if there was no blob for the given module/language pair */ public static function updateModule( $name, ResourceLoaderModule $module, $lang ) { @@ -195,7 +195,7 @@ class MessageBlobStore { /** * Update a single message in all message blobs it occurs in. * - * @param $key String: message key + * @param string $key message key */ public static function updateMessage( $key ) { try { @@ -255,8 +255,8 @@ class MessageBlobStore { /** * Create an update queue for updateMessage() * - * @param $key String: message key - * @param $prevUpdates Array: updates queue to refresh or null to build a fresh update queue + * @param string $key message key + * @param array $prevUpdates updates queue to refresh or null to build a fresh update queue * @return Array: updates queue */ private static function getUpdatesForMessage( $key, $prevUpdates = null ) { @@ -306,9 +306,9 @@ class MessageBlobStore { /** * Reencode a message blob with the updated value for a message * - * @param $blob String: message blob (JSON object) - * @param $key String: message key - * @param $lang String: language code + * @param string $blob message blob (JSON object) + * @param string $key message key + * @param string $lang language code * @return Message blob with $key replaced with its new value */ private static function reencodeBlob( $blob, $key, $lang ) { @@ -323,8 +323,9 @@ class MessageBlobStore { * Modules whose blobs are not in the database are silently dropped. * * @param $resourceLoader ResourceLoader object - * @param $modules Array of module names - * @param $lang String: language code + * @param array $modules of module names + * @param string $lang language code + * @throws MWException * @return array Array mapping module names to blobs */ private static function getFromDB( ResourceLoader $resourceLoader, $modules, $lang ) { @@ -360,7 +361,7 @@ class MessageBlobStore { * Generate the message blob for a given module in a given language. * * @param $module ResourceLoaderModule object - * @param $lang String: language code + * @param string $lang language code * @return String: JSON object */ private static function generateMessageBlob( ResourceLoaderModule $module, $lang ) { |