示例#1
0
 /**
  * 
  * @return Service
  */
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         $config = new Config(__DIR__ . '/../../../config');
         $service = new Service('GW2Tools', $config);
         foreach (Translator::getInstance()->getLangs() as $lang) {
             $service->addModule($lang, new ModuleApi($service, $lang));
         }
         $service->addModule('', new ModuleGeneric($service));
         self::$instance = $service;
     }
     return self::$instance;
 }