<?php

namespace loyalsoft;

/**
 * taptap统计接口配置信息
 * @author gwang
 */
class TapDB_config {

    public $gameClientId;
    public $gameToken;
    public $serverToken;
    public $serverUrl = "https://e.tapdb.net/v2/event";                         # event推送地址
    public $serverBatchUrl = "https://e.tapdb.net/v2/batch";                    # event批量推送地址
    public $method = "POST";                                                    # 请求方法
    public $ContentType = "Content-Type: application/json";                     # Header字段
    private static $_ins;

    /**
     * @return TapDB_config 单例
     */
    public static function Ins() {
        if (null == self::$_ins) {
            self::$_ins = new TapDB_config();
        }
        return self::$_ins;
    }

    private function __construct() {
        $arr = [Enum_Plat::Online, Enum_Plat::Online_yyb, Enum_Plat::Online_hw];
        if (in_array(PLAT, $arr)) {                                                    // 正式
            $this->gameClientId = "zof26AtQDfSoOUjMeY";                         // appid
            $this->gameToken = "InclpY9ioQeKSt40yZNjcp1uPOJ8lqCHPgmaZTUb";      // 客户端接口秘钥
            $this->serverToken = "lSFgVNpsYbxGlV4MRfhdyS8rEeusd2j4";            // 服务端接口秘钥
        } else {                                                                // 测试
            $this->gameClientId = "TNFmYW7SBavcZk5lU2";                         // appid
            $this->gameToken = "x2jdwJFyH48hAIl47c7swZTIA49Dq5MQoglAUYb5";      // 客户端接口秘钥
            $this->serverToken = "ptVLcjXr1YiW2dL4J2llRHKlisA5GgUg";            // 服务端接口秘钥
        }
    }

}
