From 2b55eb3141cc02bf5f86324309f898a7f95c7b17 Mon Sep 17 00:00:00 2001 From: yf <291323003@qq.com> Date: Fri, 2 Aug 2019 20:51:48 +0800 Subject: [PATCH] up fix --- src/Http/Controller/Api.php | 16 ---------- src/Http/ServerConfig.php | 61 ------------------------------------- src/Http/ServerProcess.php | 31 ------------------- 3 files changed, 108 deletions(-) delete mode 100644 src/Http/Controller/Api.php delete mode 100644 src/Http/ServerConfig.php delete mode 100644 src/Http/ServerProcess.php diff --git a/src/Http/Controller/Api.php b/src/Http/Controller/Api.php deleted file mode 100644 index c35ea58..0000000 --- a/src/Http/Controller/Api.php +++ /dev/null @@ -1,16 +0,0 @@ -response()->write('api'); - } -} \ No newline at end of file diff --git a/src/Http/ServerConfig.php b/src/Http/ServerConfig.php deleted file mode 100644 index a5be5db..0000000 --- a/src/Http/ServerConfig.php +++ /dev/null @@ -1,61 +0,0 @@ -port; - } - - /** - * @param int $port - */ - public function setPort(int $port): void - { - $this->port = $port; - } - - /** - * @return string - */ - public function getListenAddress(): string - { - return $this->listenAddress; - } - - /** - * @param string $listenAddress - */ - public function setListenAddress(string $listenAddress): void - { - $this->listenAddress = $listenAddress; - } - - /** - * @return string - */ - public function getControllerNamaSpace(): string - { - return $this->controllerNamaSpace; - } - - /** - * @param string $controllerNamaSpace - */ - public function setControllerNamaSpace(string $controllerNamaSpace): void - { - $this->controllerNamaSpace = $controllerNamaSpace; - } - -} \ No newline at end of file diff --git a/src/Http/ServerProcess.php b/src/Http/ServerProcess.php deleted file mode 100644 index 66fa305..0000000 --- a/src/Http/ServerProcess.php +++ /dev/null @@ -1,31 +0,0 @@ -getConfig()->getArg(); - go(function ()use($config) { - $server = new Server($config->getListenAddress(), $config->getPort(), false); - $webService = new WebService($config->getControllerNamaSpace()); - $server->handle('/', function ($request, $response)use($webService){ - $request = new Request($request); - $response = new Response($response); - $webService->onRequest($request,$response); - }); - $server->start(); - }); - } -} \ No newline at end of file