?php /** * *wechat basic callback * **/ require_once dirname(__FILE__) . '/../common/GlobalDefine.php' ; class WeChatCallback { protected $_postObject; protected $_fromUserName; protected $_toUserName; protected $_createTime; protected $_m
/**
*
*wechat basic callback
*
**/
require_once dirname(__FILE__) . '/../common/GlobalDefine.php' ;
class WeChatCallback {
protected $_postObject;
protected $_fromUserName;
protected $_toUserName;
protected $_createTime;
protected $_msgType;
protected $_msgId;
protected $_time;
pubilc function getToUserName() {
return $this->_toUserName;
}
// 组装提示信息,HINT_TPL在GlobalDefine.php中定义
protected function init($postObj) {
$resultStr = sprintf ( HINT_TPL, $this->_fromUserName,
$this->_toUserName,&this->_time, 'text', $hint ) ;
return $resultStr;
}
pubilc function init($postObj) {
// 获取参数
$this->_postObject = $postObj;
if ($this->_postObject == false) {
return false;
}
$this->_fromUserName = ( string ) trim ( $ this->_postObject->FromUserName );
$this->_createTime = ( int ) trim ( $this->_postObject->MsgId );
$this->_time = time ();
if(!($this->_fromUserName && $this->_toUserName && $this->_msgType)) {
return false;
}
return true;
}
public function process() {
// HINT_NOT_IMPLEMEMT在GlobalDefine.php中定义的一个提示信息
return $this->makeHint (HINT_NOT_IMPLEMEMT) ;
}
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools