Пример #1
0
 /**
  * 构造函数
  * @param $component_appid
  * @param $component_appsecret
  * @param $component_verify_ticket
  */
 public function __construct($options)
 {
     $db_config = (require_once '/alidata/www/weixin/framework/config/db.php');
     $wxcachedb_config = $db_config[strtoupper('wxcachedb_config')];
     require_once '/alidata/www/weixin/framework/orm/medoo.php';
     $this->db = medoo::getInstance($wxcachedb_config);
     $this->cache_table_name = 'component';
     $this->component_appid = isset($options['component_appid']) ? $options['component_appid'] : '';
     $this->component_appsecret = isset($options['component_appsecret']) ? $options['component_appsecret'] : '';
     $this->memc = $this->getMemcached();
     $this->prefix = $this->component_appid . '_component_';
     $this->component_access_token = $this->getComponentAccessToken();
 }