コード例 #1
0
ファイル: Service.php プロジェクト: mflayhart/gw2tools
 /**
  * 
  * @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;
 }
コード例 #2
0
ファイル: FileVault.php プロジェクト: mflayhart/gw2tools
 /**
  * 
  * @return FileVault
  */
 private static function getInstance($key)
 {
     if (!isset(self::$instances[$key])) {
         $path = Service::getInstance()->getPathCache() . '/' . $key;
         Directory::createIfNotExists($path);
         self::$instances[$key] = new self($path);
     }
     return self::$instances[$key];
 }
コード例 #3
0
ファイル: User.php プロジェクト: mflayhart/gw2tools
 /**
  * 
  * @return string
  */
 public static function table()
 {
     return Service::getInstance()->getConfig()->get('table.tokens', 'tokens');
 }
コード例 #4
0
ファイル: index.php プロジェクト: mflayhart/gw2tools
<?php

/*
 * This file is part of the Arnapou FileStore package.
 *
 * (c) Arnaud Buathier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
include __DIR__ . '/../vendor/autoload.php';
use Arnapou\GW2Tools\Service;
use Arnapou\Toolbox\Http\Request;
Service::getInstance()->run(Request::createFromGlobals())->send();
コード例 #5
0
ファイル: test.php プロジェクト: mflayhart/gw2tools
<?php

/*
 * This file is part of the Arnapou FileStore package.
 *
 * (c) Arnaud Buathier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
include __DIR__ . '/../vendor/autoload.php';
use Arnapou\GW2Tools\Service;
Service::getInstance();
$account = \Arnapou\GW2Tools\Gw2Account::getInstance('DEA69D98-AD5C-DA4E-9C0A-BB0B4E2BDD16FCD2DF87-E4DF-42D3-BA18-1AE0B1F25B85');
$char = $account->getCharacter('Tao Lympik');
$attrs = $char->getAttributes();
echo "\n\n";