/**
* Try to load the cache from a local file.
*
- * @param string $hash the hash of contents, to check validity.
- * @param Mixed $code Optional language code, see documenation of load().
+ * @param string $hash The hash of contents, to check validity.
+ * @param string $code Optional language code, see documenation of load().
* @return array The cache array
*/
function getLocalCache( $hash, $code ) {
/**
* Save the cache to a local file.
+ * @param string $serialized
+ * @param string $hash
+ * @param string $code
*/
function saveToLocal( $serialized, $hash, $code ) {
global $wgCacheDirectory;
* or false if populating empty cache fails. Also returns true if MessageCache
* is disabled.
*
- * @param bool|String $code Language to which load messages
+ * @param bool|string $code Language to which load messages
* @throws MWException
* @return bool
*/
/**
* Is the given cache array expired due to time passing or a version change?
*
- * @param $cache
+ * @param array $cache
* @return bool
*/
protected function isCacheExpired( $cache ) {
* a timeout of MessageCache::MSG_LOCK_TIMEOUT.
*
* @param string $key
- * @return Boolean: success
+ * @return bool Success
*/
function lock( $key ) {
$lockKey = $key . ':lock';
* * Fallbacks will be just that: fallbacks. A fallback language will never be reached if
* the message is available *anywhere* in the language for which it is a fallback.
*
- * @param string $key the message key
+ * @param string $key The message key
* @param bool $useDB If true, look for the message in the DB, false
- * to use only the compiled l10n cache.
+ * to use only the compiled l10n cache.
* @param bool|string|object $langcode Code of the language to get the message for.
- * - If string and a valid code, will create a standard language object
- * - If string but not a valid code, will create a basic language object
- * - If boolean and false, create object from the current users language
- * - If boolean and true, create object from the wikis content language
- * - If language object, use it as given
- * @param bool $isFullKey specifies whether $key is a two part key
- * "msg/lang".
+ * - If string and a valid code, will create a standard language object
+ * - If string but not a valid code, will create a basic language object
+ * - If boolean and false, create object from the current users language
+ * - If boolean and true, create object from the wikis content language
+ * - If language object, use it as given
+ * @param bool $isFullKey specifies whether $key is a two part key "msg/lang".
*
* @throws MWException when given an invalid key
* @return string|bool False if the message doesn't exist, otherwise the
}
/**
- * @param $key
+ * @param string $key
* @return array
*/
public function figureMessage( $key ) {
* for which MediaWiki:msgkey exists. If $code is another language code, this
* will ONLY return message keys for which MediaWiki:msgkey/$code exists.
* @param string $code Language code
- * @return array of message keys (strings)
+ * @return array Array of message keys (strings)
*/
public function getAllMessageKeys( $code ) {
global $wgContLang;