use Cdb\Exception as CdbException;
use Cdb\Reader as CdbReader;
use Cdb\Writer as CdbWriter;
+use CLDRPluralRuleParser\Evaluator;
/**
* Class for caching the contents of localisation files, Messages*.php
case 'db':
$storeClass = 'LCStoreDB';
break;
+ case 'array':
+ $storeClass = 'LCStoreStaticArray';
+ break;
case 'detect':
$storeClass = $wgCacheDirectory ? 'LCStoreCDB' : 'LCStoreDB';
break;
*/
protected function readPHPFile( $_fileName, $_fileType ) {
// Disable APC caching
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
include $_fileName;
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
ini_set( 'apc.cache_by_default', $_apcEnabled );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $_fileType == 'core' || $_fileType == 'extension' ) {
$data = compact( self::$allKeys );
public function readJSONFile( $fileName ) {
if ( !is_readable( $fileName ) ) {
-
return array();
}
$json = file_get_contents( $fileName );
if ( $json === false ) {
-
return array();
}
return null;
}
try {
- $compiledRules = CLDRPluralRuleEvaluator::compile( $rules );
+ $compiledRules = Evaluator::compile( $rules );
} catch ( CLDRPluralRuleError $e ) {
wfDebugLog( 'l10n', $e->getMessage() );