refactor all base things

This commit is contained in:
crazywhalecc
2022-08-13 17:00:29 +08:00
committed by Jerry Ma
parent 1c801bb205
commit b2c95d96b1
54 changed files with 3009 additions and 383 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace ZM\Context;
use OneBot\Driver\Event\Http\HttpRequestEvent;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
interface ContextInterface
{
/**
* 获取 Http Request 请求对象
*/
public function getRequest(): ServerRequestInterface;
/**
* 获取 Http 请求事件对象
*/
public function getHttpRequestEvent(): HttpRequestEvent;
/**
* 使用 Response 对象响应 Http 请求
* Wrapper of HttpRequestEvent::withResponse method
*
* @param ResponseInterface $response 响应对象
*/
public function withResponse(ResponseInterface $response);
}