Files
kiri-wchat/wchat/wx/ContentAsyncCheck.php
T

146 lines
1.9 KiB
PHP
Raw Normal View History

2019-12-19 15:00:25 +08:00
<?php
2020-03-05 12:41:49 +08:00
namespace wchat\wx;
2019-12-19 15:00:25 +08:00
/**
* Class ContentAsyncCheck
* @package wchat
*/
class ContentAsyncCheck
{
private $_ToUserName = '';
private $_FromUserName = '';
private $_CreateTime = '';
private $_MsgType = '';
private $_Event = '';
private $_isrisky = '';
private $_extra_info_json = '';
private $_appid = '';
private $_trace_id = '';
private $_status_code = '';
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getToUserName()
2019-12-19 15:00:25 +08:00
{
return $this->_ToUserName;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getFromUserName()
2019-12-19 15:00:25 +08:00
{
return $this->_FromUserName;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getCreateTime()
2019-12-19 15:00:25 +08:00
{
return $this->_CreateTime;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getMsgType()
2019-12-19 15:00:25 +08:00
{
return $this->_MsgType;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getEvent()
2019-12-19 15:00:25 +08:00
{
return $this->_Event;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getIsrisky()
2019-12-19 15:00:25 +08:00
{
return $this->_isrisky;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getExtraInfoJson()
2019-12-19 15:00:25 +08:00
{
return $this->_extra_info_json;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getAppid()
2019-12-19 15:00:25 +08:00
{
return $this->_appid;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getTraceId()
2019-12-19 15:00:25 +08:00
{
return $this->_trace_id;
}
/**
* @return string
*/
2021-04-06 15:15:37 +08:00
public function getStatusCode()
2019-12-19 15:00:25 +08:00
{
return $this->_status_code;
}
/**
* @param array $params
* @return ContentAsyncCheck|null
*/
public static function instance(array $params)
{
static $class = null;
if ($class === null) {
$class = new ContentAsyncCheck();
}
return $class->init($params);
}
/**
* @param $params
* @return $this
*/
private function init($params)
{
foreach ($params as $item => $param) {
$this->{'_' . $item} = $param;
}
return $this;
}
/**
* @return bool
*/
public function isRisky()
{
return intval($this->_isrisky) === 0;
}
/**
* @return bool
*/
public function isSuccess()
{
return $this->_status_code === 0;
}
}