예제 #1
0
 private static function _initLocaleMap()
 {
     $locale_map = array();
     $locale_map_arr = self::$_conf_cache['locale_map'];
     if ($locale_map_arr) {
         foreach ($locale_map_arr as $_v) {
             $_tmp = str_replace(array('=>', '= >'), ',', $_v);
             $_tmp = explode(',', $_tmp);
             $_locale = trim($_tmp[0]);
             $_instance = trim($_tmp[1]);
             if (!self::_checkLocaleValid($_locale)) {
                 Bd_Log::warning("locale_map \"{$_v}\"'s locale is not valid, ignored!");
                 continue;
             }
             if (!self::_checkInstanceValid($_instance)) {
                 Bd_Log::warning("locale_map \"{$_v}\"'s instance is not valid, ignored!");
                 continue;
             }
             $locale_map[$_locale] = $_instance;
         }
     }
     self::$_locale_map = $locale_map;
 }