This commit is contained in:
2020-09-02 11:38:47 +08:00
parent 3e46f5790f
commit 8397c2ac8a
46 changed files with 1021 additions and 824 deletions
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace HttpServer\Service;
use Exception;
use HttpServer\Http\Context;
use HttpServer\Http\Request as HRequest;
use HttpServer\Http\Response as HResponse;
use ReflectionException;
use Snowflake\Core\JSON;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
use Swoole\Error;
use Swoole\Http\Request;
use Swoole\Http\Response;
use Swoole\Http\Server;
use HttpServer\Service\Abstracts\Http as AHttp;
class Http extends AHttp
{
/**
* @throws ReflectionException
* @throws NotFindClassException
*/
public function onInit()
{
$this->onHandlerListener();
$this->onBaseListener();
}
/**
* @throws NotFindClassException
* @throws ReflectionException
*/
public function onBaseListener()
{
$this->on('request', $this->createHandler('request'));
}
}