/** * 构造函数,检查配置是否完成 */ protected function __construct() { SimpleSession::init(null, getHash($_POST['FromUserName'])); if (!$_SESSION['wechatActivity']) { $_SESSION['wechatActivity'] = null; } if (!$_SESSION['callbackStack']) { $_SESSION['callbackStack'] = null; } $this->activity =& $_SESSION['wechatActivity']; $this->callbackStack =& $_SESSION['callbackStack']; $this->token = getConfig("wechat", "token"); $this->appInfo =& getAppInfo(); }
/** * 释放当前类 */ public static function release() { session_unset(); session_destroy(); self::$selfObject = null; }