mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-05 07:45:37 +08:00
update to 1.2.1
add phar build script
This commit is contained in:
@@ -24,14 +24,15 @@ class Hello extends ModBase
|
||||
* @SwooleEventAt("open",rule="connectType:qq")
|
||||
* @param $conn
|
||||
*/
|
||||
public function onConnect(CQConnection $conn){
|
||||
Console::info("机器人 ".$conn->getQQ()." 已连接!");
|
||||
public function onConnect(CQConnection $conn) {
|
||||
Console::info("机器人 " . $conn->getQQ() . " 已连接!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 向机器人发送"你好",即可回复这句话
|
||||
* @CQCommand("你好")
|
||||
*/
|
||||
public function hello(){
|
||||
public function hello() {
|
||||
return "你好啊,我是由炸毛框架构建的机器人!";
|
||||
}
|
||||
|
||||
@@ -40,7 +41,7 @@ class Hello extends ModBase
|
||||
* @RequestMapping("/httpTimer")
|
||||
* @Middleware("timer")
|
||||
*/
|
||||
public function timer(){
|
||||
public function timer() {
|
||||
return "This page is used as testing TimerMiddleware! Do not use it in production.";
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ class Hello extends ModBase
|
||||
* 框架会默认关闭未知的WebSocket链接,因为这个绑定的事件,你可以根据你自己的需求进行修改
|
||||
* @SwooleEventAt(type="open",rule="connectType:unknown")
|
||||
*/
|
||||
public function closeUnknownConn(){
|
||||
public function closeUnknownConn() {
|
||||
Console::info("Unknown connection , I will close it.");
|
||||
$this->connection->close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user