Example #1
0
 public static function DoAction()
 {
     self::$postObj = self::GetRequestXMLData();
     if (self::$postObj === FALSE || !isset(self::$postObj->FromUserName) || !isset(self::$postObj->ToUserName) || !isset(self::$postObj->CreateTime) || !isset(self::$postObj->MsgType) || \Web\Utils\StringUtitly::IsBlank(self::$postObj->FromUserName) || \Web\Utils\StringUtitly::IsBlank(self::$postObj->ToUserName) || \Web\Utils\StringUtitly::IsBlank(self::$postObj->CreateTime) || \Web\Utils\StringUtitly::IsBlank(self::$postObj->MsgType)) {
         \Web\Utils\MPXML::TextAlertEx(0, 0, "request error");
         exit;
     }
     $ControllerClass = "\\Web\\Controller\\MPMsg\\MType_" . strtoupper(self::$Context->MsgType);
     if (!class_exists($ControllerClass, true)) {
         \Web\Utils\Logger::Error(self::$postObj, "MsgType Not Class Attach");
         \Web\Utils\MPXML::TextAlert(self::$postObj, "MsgType Not Class Attach");
     }
     $openid = self::$postObj->FromUserName;
     self::$Context = new $ControllerClass();
     self::$Context->Initialize();
 }