| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Resource message blobs storage used by the resource loader. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| Author: | Roan Kattouw |
| Author: | Trevor Parscal |
| File Size: | 396 lines (12 kb) |
| Included or required: | 0 times |
| Referenced: | 1 time |
| Includes or requires: | 0 files |
MessageBlobStore:: (10 methods):
getInstance()
get()
insertMessageBlob()
updateModule()
updateMessage()
clear()
getUpdatesForMessage()
reencodeBlob()
getFromDB()
generateMessageBlob()
Class: MessageBlobStore - X-Ref
This class provides access to the resource message blobs storage used by| getInstance() X-Ref |
| Get the singleton instance return: MessageBlobStore |
| get( ResourceLoader $resourceLoader, $modules, $lang ) X-Ref |
| Get the message blobs for a set of modules param: ResourceLoader $resourceLoader 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 |
| insertMessageBlob( $name, ResourceLoaderModule $module, $lang ) X-Ref |
| Generate and insert a new message blob. If the blob was already present, it is not regenerated; instead, the preexisting blob is fetched and returned. param: string $name Module name param: ResourceLoaderModule $module param: string $lang Language code return: mixed Message blob or false if the module has no messages |
| updateModule( $name, ResourceLoaderModule $module, $lang ) X-Ref |
| Update the message blob for a given module in a given language param: string $name Module name param: ResourceLoaderModule $module param: string $lang Language code return: string Regenerated message blob, or null if there was no blob for |
| updateMessage( $key ) X-Ref |
| Update a single message in all message blobs it occurs in. param: string $key Message key |
| clear() X-Ref |
| No description |
| getUpdatesForMessage( $key, $prevUpdates = null ) X-Ref |
| Create an update queue for updateMessage() param: string $key Message key param: array $prevUpdates Updates queue to refresh or null to build a fresh update queue return: array Updates queue |
| reencodeBlob( $blob, $key, $lang ) X-Ref |
| Reencode a message blob with the updated value for a message param: string $blob Message blob (JSON object) param: string $key Message key param: string $lang Language code return: string Message blob with $key replaced with its new value |
| getFromDB( ResourceLoader $resourceLoader, $modules, $lang ) X-Ref |
| Get the message blobs for a set of modules from the database. Modules whose blobs are not in the database are silently dropped. param: ResourceLoader $resourceLoader param: array $modules Array of module names param: string $lang Language code return: array Array mapping module names to blobs |
| generateMessageBlob( ResourceLoaderModule $module, $lang ) X-Ref |
| Generate the message blob for a given module in a given language. param: ResourceLoaderModule $module param: string $lang Language code return: string JSON object |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |