Esempio n. 1
0
 /**
  * 配置
  * @param $config
  * @example
  * array(
  *  'username' => 'xxx',
  *  'password' => 'xxx',
  *  'secret_key' => 'xxx',
  *  'content_tpl'  => "您正在注册华友汇,本次验证码为:%s,两分钟内有效!【%s】",
  *  'suffix' => '华友汇'
  * );
  */
 public function setConf($config)
 {
     parent::setConf($config);
     $this->username = $config['username'];
     $this->password = $config['password'];
     $this->secret_key = $config['secret_key'];
     $this->content_tpl = $config['content_tpl'];
     $this->suffix = $config['suffix'];
 }
Esempio n. 2
0
 /**
  * 配置
  * @param $config
  * @throws \Lib\SmsLib\Exception
  * @example
  * array(
  *  'sn' => 'xxx',
  *  'password' => 'xxx',
  *  'ext' => '',
  *  'rrid' => '',
  *  'stime' => '',
  *  'appName' => '多美淘'
  * );
  */
 public function setConf($config)
 {
     parent::setConf($config);
     $this->_sn = $config['sn'];
     $this->_password = $config['password'];
     $this->_ext = $config['ext'];
     $this->_appName = $config['appName'];
     $this->_rrid = $config['rrid'];
     $this->_stime = $config['stime'];
 }
 public function setConf($config)
 {
     parent::setConf($config);
     //设置主帐号
     $this->account_sid = $config['account_sid'];
     $this->account_token = $config['account_token'];
     $this->app_id = $config['app_id'];
     $this->timestamp_ = date("YmdHis");
     $this->is_sandbox = $config['is_sandbox'];
     //$this->template_id = $config['template_id'];
     $this->server_ip = $this->is_sandbox ? $this->sandbox_url : $this->product_url;
     $this->server_port = isset($config['server_port']) ? $config['server_port'] : '8883';
     $this->soft_version = isset($config['soft_version']) ? $config['soft_version'] : '2013-12-26';
     $this->body_type = isset($config['body_type']) ? $config['body_type'] : 'json';
 }
 /**
  * 配置
  * @param $config
  */
 public function setConf($config)
 {
     parent::setConf($config);
     $this->app_id = $config['app_id'];
     $this->app_secret = $config['app_secret'];
 }