private $mergeableKeys = null;
/**
- * Constructor.
* For constructor parameters, see the documentation in DefaultSettings.php
* for $wgLocalisationCacheConf.
*
case 'detect':
if ( !empty( $conf['storeDirectory'] ) ) {
$storeClass = 'LCStoreCDB';
+ } elseif ( $wgCacheDirectory ) {
+ $storeConf['directory'] = $wgCacheDirectory;
+ $storeClass = 'LCStoreCDB';
} else {
- $cacheDir = $wgCacheDirectory ?: wfTempDir();
- if ( $cacheDir ) {
- $storeConf['directory'] = $cacheDir;
- $storeClass = 'LCStoreCDB';
- } else {
- $storeClass = 'LCStoreDB';
- }
+ $storeClass = 'LCStoreDB';
}
break;
default:
throw new MWException(
- 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' );
+ 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.'
+ );
}
}
- wfDebugLog( 'caches', get_class( $this ) . ": using store $storeClass" );
+ wfDebugLog( 'caches', static::class . ": using store $storeClass" );
if ( !empty( $conf['storeDirectory'] ) ) {
$storeConf['directory'] = $conf['storeDirectory'];
}
* array.
* @param string $code
* @param string $key
- * @return bool|null|string
+ * @return bool|null|string|string[]
*/
public function getSubitemList( $code, $key ) {
if ( in_array( $key, self::$splitKeys ) ) {
* exists, the data array is returned, otherwise false is returned.
*
* @param string $code
- * @param array $deps
+ * @param array &$deps
* @return array
*/
protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
* Merge two localisation values, a primary and a fallback, overwriting the
* primary value in place.
* @param string $key
- * @param mixed $value
+ * @param mixed &$value
* @param mixed $fallbackValue
*/
protected function mergeItem( $key, &$value, $fallbackValue ) {
}
/**
- * @param mixed $value
+ * @param mixed &$value
* @param mixed $fallbackValue
*/
protected function mergeMagicWords( &$value, $fallbackValue ) {
* otherwise.
* @param array $codeSequence
* @param string $key
- * @param mixed $value
+ * @param mixed &$value
* @param mixed $fallbackValue
* @return bool
*/