e
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
use Closure;
|
||||
use Http\Http\Request;
|
||||
|
||||
interface After
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param $params
|
||||
* @return mixed
|
||||
*/
|
||||
public function onHandler(Request $request, $params): void;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Interface AuthIdentity
|
||||
* @package Kiri\Kiri\Http
|
||||
*/
|
||||
interface AuthIdentity
|
||||
{
|
||||
|
||||
|
||||
public function getIdentity();
|
||||
|
||||
|
||||
/**
|
||||
* @return string|int
|
||||
* 获取唯一识别码
|
||||
*/
|
||||
public function getUniqueId(): string|int;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: whwyy
|
||||
* Date: 2018/4/8 0008
|
||||
* Time: 17:29
|
||||
*/
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Interface IFormatter
|
||||
* @package Kiri\Kiri\Http\Formatter
|
||||
*/
|
||||
interface IFormatter
|
||||
{
|
||||
|
||||
/**
|
||||
* @param $context
|
||||
* @return static
|
||||
*/
|
||||
public function send($context): static;
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getData(): mixed;
|
||||
|
||||
public function clear(): void;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
use Http\Http\Request;
|
||||
use Closure;
|
||||
|
||||
interface Interceptor
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Closure $closure
|
||||
* @return mixed
|
||||
*/
|
||||
public function Interceptor(Request $request, Closure $closure): mixed;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
use Http\Http\Request;
|
||||
use Closure;
|
||||
|
||||
interface Limits
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Closure $closure
|
||||
* @return mixed
|
||||
*/
|
||||
public function next(Request $request, Closure $closure): mixed;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
use Closure;
|
||||
use Http\Http\Request;
|
||||
|
||||
/**
|
||||
* Interface IMiddleware
|
||||
* @package Kiri\Kiri\Route
|
||||
*/
|
||||
interface Middleware
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function onHandler(Request $request, Closure $next): mixed;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
interface RouterInterface
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
interface Service
|
||||
{
|
||||
|
||||
|
||||
public function onInit();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Http\IInterface;
|
||||
|
||||
|
||||
interface Task
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getParams(): array;
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return $this
|
||||
*/
|
||||
public function setParams(array $params): static;
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function onHandler(): mixed;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user