public function __construct($config, $type = null)
{
$this->config = array_merge($this->config, (array) $config);
$this->is_mobile = $type == 'wap' || $type === true ? true : false;
if ($this->is_mobile) {
$this->gateway = self::GATEWAY_MOBILE;
}
if ($type == 'wap' || $type === true) {
$this->service = self::SERVICE_WAP;
} elseif ($type == 'app') {
$this->service = self::SERVICE_APP;
}
}