From ba5501adae5dd7a44432fdb5f9442d833fa317ed Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 23 Mar 2021 02:41:24 +0800 Subject: [PATCH] modify --- Annotation/Route/Cmd.php | 51 +++++++++++++++++++++++++++++++++++++ HttpServer/Http/Request.php | 1 + 2 files changed, 52 insertions(+) create mode 100644 Annotation/Route/Cmd.php diff --git a/Annotation/Route/Cmd.php b/Annotation/Route/Cmd.php new file mode 100644 index 00000000..f6062d6f --- /dev/null +++ b/Annotation/Route/Cmd.php @@ -0,0 +1,51 @@ +getRouter(); + + $router->addRoute($this->cmd, $handler, Request::HTTP_CMD); + + return $router; + } + + +} diff --git a/HttpServer/Http/Request.php b/HttpServer/Http/Request.php index f3eaba60..a7e237ea 100644 --- a/HttpServer/Http/Request.php +++ b/HttpServer/Http/Request.php @@ -67,6 +67,7 @@ class Request extends HttpService const HTTP_POST = 'post'; const HTTP_GET = 'get'; + const HTTP_CMD = 'cmd'; const HTTP_SOCKET = 'sw::socket';