BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
MessageBlobStore Class Reference
Inheritance diagram for MessageBlobStore:
Collaboration diagram for MessageBlobStore:

Public Member Functions

 __construct (ResourceLoader $rl=null, LoggerInterface $logger=null)
 
 setLogger (LoggerInterface $logger)
 
 getBlob (ResourceLoaderModule $module, $lang)
 
 getBlobs (array $modules, $lang)
 
 get (ResourceLoader $resourceLoader, $modules, $lang)
 
 insertMessageBlob ($name, ResourceLoaderModule $module, $lang)
 
 updateMessage ($key)
 
 clear ()
 

Protected Member Functions

 recacheMessageBlob ($cacheKey, ResourceLoaderModule $module, $lang)
 
 getResourceLoader ()
 
 fetchMessage ($key, $lang)
 

Protected Attributes

 $logger
 
 $wanCache
 

Detailed Description

This class generates message blobs for use by ResourceLoader modules.

A message blob is a JSON object containing the interface messages for a certain module in a certain language.

Constructor & Destructor Documentation

MessageBlobStore::__construct ( ResourceLoader  $rl = null,
LoggerInterface  $logger = null 
)
Parameters
ResourceLoader$rl
LoggerInterface$logger

Member Function Documentation

MessageBlobStore::clear ( )

Invalidate cache keys for all known modules. Called by LocalisationCache after cache is regenerated.

MessageBlobStore::fetchMessage (   $key,
  $lang 
)
protected
Since
1.27
Parameters
string$keyMessage key
string$langLanguage code
Returns
string
MessageBlobStore::get ( ResourceLoader  $resourceLoader,
  $modules,
  $lang 
)
Deprecated:
since 1.27 Use getBlobs() instead
Returns
array
MessageBlobStore::getBlob ( ResourceLoaderModule  $module,
  $lang 
)

Get the message blob for a module

Since
1.27
Parameters
ResourceLoaderModule$module
string$langLanguage code
Returns
string JSON
MessageBlobStore::getBlobs ( array  $modules,
  $lang 
)

Get the message blobs for a set of modules

Since
1.27
Parameters
ResourceLoaderModule[]$modules Array of module objects keyed by name
string$langLanguage code
Returns
array An array mapping module names to message blobs
MessageBlobStore::getResourceLoader ( )
protected
Since
1.27
Returns
ResourceLoader
MessageBlobStore::insertMessageBlob (   $name,
ResourceLoaderModule  $module,
  $lang 
)
Deprecated:
since 1.27 Obsolete. Used to populate a cache table in the database.
Returns
bool
MessageBlobStore::recacheMessageBlob (   $cacheKey,
ResourceLoaderModule  $module,
  $lang 
)
protected
Since
1.27
Parameters
string$cacheKey
ResourceLoaderModule$module
string$lang
Returns
string JSON blob
MessageBlobStore::setLogger ( LoggerInterface  $logger)
Since
1.27
Parameters
LoggerInterface$logger

Implements Psr\Log\LoggerAwareInterface.

MessageBlobStore::updateMessage (   $key)

Invalidate cache keys for modules using this message key. Called by MessageCache when a message has changed.

Parameters
string$keyMessage key

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