PKPLocale::_allLocalesCacheMiss PHP Method

_allLocalesCacheMiss() static public method

Create a cache file with locale data.
static public _allLocalesCacheMiss ( $cache, $id )
$cache CacheManager
$id the cache id (not used here, required by the cache manager)
    static function _allLocalesCacheMiss($cache, $id)
    {
        $allLocales =& Registry::get('allLocales', true, null);
        if ($allLocales === null) {
            // Add a locale load to the debug notes.
            $notes =& Registry::get('system.debug.notes');
            $notes[] = array('debug.notes.localeListLoad', array('localeList' => LOCALE_REGISTRY_FILE));
            // Reload locale registry file
            $allLocales = AppLocale::loadLocaleList(LOCALE_REGISTRY_FILE);
            asort($allLocales);
            $cache->setEntireCache($allLocales);
        }
        return null;
    }