Add InitBuffer annotation

This commit is contained in:
whale
2020-03-08 16:40:04 +08:00
parent 4af90e00ff
commit 5f43cf4f00
5 changed files with 59 additions and 1 deletions

View File

@@ -5,7 +5,10 @@ namespace Module\Example;
use Framework\Console;
use Framework\ZMBuf;
use ZM\Annotation\CQ\CQCommand;
use ZM\Annotation\Http\Controller;
use ZM\Annotation\Http\RequestMapping;
use ZM\Annotation\Module\Closed;
use ZM\Annotation\Swoole\SwooleEventAt;
use ZM\Connection\CQConnection;
@@ -14,7 +17,7 @@ use ZM\ModBase;
/**
* Class Hello
* @package Module\Example
* @Closed()
* @Controller("/view")
*/
class Hello extends ModBase
{
@@ -31,4 +34,18 @@ class Hello extends ModBase
public function hello(){
return "你好啊,我是由炸毛框架构建的机器人!";
}
/**
* @RequestMapping("/test/{ping}")
*/
public function ping($param){
return "You input id is: ".$param["ping"];
}
/**
* @RequestMapping("/test/pong")
*/
public function pong(){
$this->response->end("ping");
}
}