mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-04 07:15:36 +08:00
add Middleware and release version 1.1.0
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Module\Example;
|
||||
|
||||
use Framework\Console;
|
||||
use ZM\Annotation\CQ\CQCommand;
|
||||
use ZM\Annotation\Http\Middleware;
|
||||
use ZM\Annotation\Http\RequestMapping;
|
||||
use ZM\Annotation\Swoole\SwooleEventAt;
|
||||
use ZM\Connection\CQConnection;
|
||||
@@ -33,6 +34,7 @@ class Hello extends ModBase
|
||||
|
||||
/**
|
||||
* @RequestMapping("/test/ping")
|
||||
* @Middleware("timer")
|
||||
*/
|
||||
public function pong(){
|
||||
return "pong";
|
||||
@@ -45,4 +47,4 @@ class Hello extends ModBase
|
||||
Console::info("Unknown connection , I will close it.");
|
||||
$this->connection->close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user