public static function init($adapter = null)
 {
     if (!self::$init) {
         self::$init = true;
         // Alias to gettext
         if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' || !function_exists('gettext')) {
             self::$adapter = new waLocalePHPAdapter();
         } else {
             self::$adapter = $adapter ? $adapter : new waLocaleAdapter();
         }
     }
 }
 public function loadFactories()
 {
     if (self::$current == 'wa-system') {
         $file_path = $this->getConfig()->getPath('config', 'factories');
         if (file_exists($file_path)) {
             self::$factories_config = (include $file_path);
         }
     }
     if (isset(self::$factories_config['locale'])) {
         waLocale::init(self::getCommonFactory('locale', 'waLocaleAdapter'));
     } else {
         waLocale::init();
     }
 }
示例#3
0
 public function loadFactories()
 {
     if (self::$current == 'wa-system') {
         $file_path = $this->getConfig()->getPath('config', 'factories');
         if (file_exists($file_path)) {
             self::$factories_config = (include $file_path);
         }
     }
     waLocale::init();
 }