예제 #1
0
 /**
  * Returns a singleton reference of this class.
  *
  * @author Stefan Herndler
  * @since 1.0.0
  * @return WPT_Localization
  */
 public static function singleton()
 {
     // initialize singleton if first call
     if (!self::$a_obj_Singleton instanceof WBR_Localization) {
         self::$a_obj_Singleton = new self();
     }
     // return the singleton of this class
     return self::$a_obj_Singleton;
 }
 /**
  * Loads and registers the translation of strings.
  *
  * @author Stefan Herndler
  * @since 1.0.0
  */
 private function loadLocalization()
 {
     // require the class which handles the localization
     require_once dirname(__FILE__) . '/Localization.php';
     // get the singleton once to call the constructor and initialize the class
     WBR_Localization::singleton();
 }