update to 1.3.0 version.

This commit is contained in:
whale
2020-05-06 17:26:50 +08:00
parent 086c65af26
commit a1b013ee53
13 changed files with 321 additions and 74 deletions

View File

@@ -7,12 +7,13 @@ namespace ZM\Context;
use Swoole\Http\Request;
use Swoole\WebSocket\Frame;
use Swoole\WebSocket\Server;
use ZM\Connection\WSConnection;
use ZM\Http\Response;
use ZM\Utils\ZMRobot;
interface ContextInterface
{
public function __construct($param, $cid);
public function __construct($cid);
/** @return Server */
public function getServer();
@@ -23,6 +24,14 @@ interface ContextInterface
/** @return mixed */
public function getData();
public function setData($data);
/** @return WSConnection */
public function getConnection();
/** @return int|null */
public function getFd();
/** @return int */
public function getCid();
@@ -34,4 +43,74 @@ interface ContextInterface
/** @return ZMRobot */
public function getRobot();
/** @return mixed */
public function getUserId();
/** @return mixed */
public function getGroupId();
/** @return mixed */
public function getDiscussId();
/** @return string */
public function getMessageType();
/** @return mixed */
public function getRobotId();
/** @return mixed */
public function getMessage();
public function setMessage($msg);
public function setUserId($id);
public function setGroupId($id);
public function setDiscussId($id);
public function setMessageType($type);
/**
* @param $msg
* @param bool $yield
* @return mixed
*/
public function reply($msg, $yield = false);
/**
* @param $msg
* @param bool $yield
* @return mixed
*/
public function finalReply($msg, $yield = false);
/**
* @param string $prompt
* @param int $timeout
* @param string $timeout_prompt
* @return mixed
*/
public function waitMessage($prompt = "", $timeout = 600, $timeout_prompt = "");
/**
* @param $arg
* @param $mode
* @param $prompt_msg
* @return mixed
*/
public function getArgs(&$arg, $mode, $prompt_msg);
public function setCache($key, $value);
/**
* @param $key
* @return mixed
*/
public function getCache($key);
public function cloneFromParent();
public function copy();
}