改名
This commit is contained in:
@@ -5,7 +5,6 @@ namespace HttpServer\Abstracts;
|
|||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\SMTP;
|
use PHPMailer\PHPMailer\SMTP;
|
||||||
use Snowflake\Abstracts\Config;
|
use Snowflake\Abstracts\Config;
|
||||||
@@ -21,7 +20,7 @@ use Swoole\Timer;
|
|||||||
* Class Callback
|
* Class Callback
|
||||||
* @package HttpServer\Abstracts
|
* @package HttpServer\Abstracts
|
||||||
*/
|
*/
|
||||||
abstract class Callback extends Application
|
abstract class Callback extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ declare(strict_types=1);
|
|||||||
namespace HttpServer\Abstracts;
|
namespace HttpServer\Abstracts;
|
||||||
|
|
||||||
|
|
||||||
use HttpServer\Application;
|
|
||||||
use Swoole\WebSocket\Server;
|
use Swoole\WebSocket\Server;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ServerBase
|
* Class ServerBase
|
||||||
* @package Snowflake\Snowflake\Server
|
* @package Snowflake\Snowflake\Server
|
||||||
*/
|
*/
|
||||||
abstract class ServerBase extends Application
|
abstract class ServerBase extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Server */
|
/** @var Server */
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ namespace HttpServer\Http\Formatter;
|
|||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use HttpServer\Abstracts\HttpService;
|
||||||
use Snowflake\Core\Json;
|
use Snowflake\Core\Json;
|
||||||
use HttpServer\Application;
|
|
||||||
use Swoole\Http\Response;
|
use Swoole\Http\Response;
|
||||||
use HttpServer\IInterface\IFormatter;
|
use HttpServer\IInterface\IFormatter;
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ use HttpServer\IInterface\IFormatter;
|
|||||||
* Class HtmlFormatter
|
* Class HtmlFormatter
|
||||||
* @package Snowflake\Snowflake\Http\Formatter
|
* @package Snowflake\Snowflake\Http\Formatter
|
||||||
*/
|
*/
|
||||||
class HtmlFormatter extends Application implements IFormatter
|
class HtmlFormatter extends HttpService implements IFormatter
|
||||||
{
|
{
|
||||||
|
|
||||||
public $data;
|
public $data;
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace HttpServer\Http\Formatter;
|
namespace HttpServer\Http\Formatter;
|
||||||
|
|
||||||
use Exception;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\Application;
|
|
||||||
use HttpServer\IInterface\IFormatter;
|
use HttpServer\IInterface\IFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class JsonFormatter
|
* Class JsonFormatter
|
||||||
* @package Snowflake\Snowflake\Http\Formatter
|
* @package Snowflake\Snowflake\Http\Formatter
|
||||||
*/
|
*/
|
||||||
class JsonFormatter extends Application implements IFormatter
|
class JsonFormatter extends HttpService implements IFormatter
|
||||||
{
|
{
|
||||||
public $data;
|
public $data;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace HttpServer\Http\Formatter;
|
|||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use SimpleXMLElement;
|
use SimpleXMLElement;
|
||||||
use Swoole\Http\Response;
|
use Swoole\Http\Response;
|
||||||
use HttpServer\IInterface\IFormatter;
|
use HttpServer\IInterface\IFormatter;
|
||||||
@@ -21,7 +21,7 @@ use HttpServer\IInterface\IFormatter;
|
|||||||
* Class XmlFormatter
|
* Class XmlFormatter
|
||||||
* @package Snowflake\Snowflake\Http\Formatter
|
* @package Snowflake\Snowflake\Http\Formatter
|
||||||
*/
|
*/
|
||||||
class XmlFormatter extends Application implements IFormatter
|
class XmlFormatter extends HttpService implements IFormatter
|
||||||
{
|
{
|
||||||
|
|
||||||
public ?string $data = '';
|
public ?string $data = '';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||||||
namespace HttpServer\Http;
|
namespace HttpServer\Http;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\IInterface\AuthIdentity;
|
use HttpServer\IInterface\AuthIdentity;
|
||||||
|
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
@@ -33,7 +33,7 @@ defined('REQUEST_FAIL') or define('REQUEST_FAIL', 500);
|
|||||||
* @property-read $isPackage
|
* @property-read $isPackage
|
||||||
* @property-read $isReceive
|
* @property-read $isReceive
|
||||||
*/
|
*/
|
||||||
class Request extends Application
|
class Request extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var int $fd */
|
/** @var int $fd */
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace HttpServer\Http;
|
namespace HttpServer\Http;
|
||||||
|
|
||||||
use HttpServer\Application;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\Http\Formatter\HtmlFormatter;
|
use HttpServer\Http\Formatter\HtmlFormatter;
|
||||||
use HttpServer\Http\Formatter\JsonFormatter;
|
use HttpServer\Http\Formatter\JsonFormatter;
|
||||||
use HttpServer\Http\Formatter\XmlFormatter;
|
use HttpServer\Http\Formatter\XmlFormatter;
|
||||||
@@ -23,7 +23,7 @@ use Swoole\Http2\Response as S2Response;
|
|||||||
* Class Response
|
* Class Response
|
||||||
* @package Snowflake\Snowflake\Http
|
* @package Snowflake\Snowflake\Http
|
||||||
*/
|
*/
|
||||||
class Response extends Application
|
class Response extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
const JSON = 'json';
|
const JSON = 'json';
|
||||||
|
|||||||
@@ -5,20 +5,20 @@ declare(strict_types=1);
|
|||||||
namespace HttpServer\Route;
|
namespace HttpServer\Route;
|
||||||
|
|
||||||
|
|
||||||
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\Exception\AuthException;
|
use HttpServer\Exception\AuthException;
|
||||||
use HttpServer\Route\Filter\BodyFilter;
|
use HttpServer\Route\Filter\BodyFilter;
|
||||||
use HttpServer\Route\Filter\FilterException;
|
use HttpServer\Route\Filter\FilterException;
|
||||||
use HttpServer\Route\Filter\HeaderFilter;
|
use HttpServer\Route\Filter\HeaderFilter;
|
||||||
use HttpServer\Route\Filter\QueryFilter;
|
use HttpServer\Route\Filter\QueryFilter;
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Filter
|
* Class Filter
|
||||||
* @package Snowflake\Snowflake\Route
|
* @package Snowflake\Snowflake\Route
|
||||||
*/
|
*/
|
||||||
class Filter extends Application
|
class Filter extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Filter\Filter[] */
|
/** @var Filter\Filter[] */
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ namespace HttpServer\Route\Filter;
|
|||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use validator\Validator;
|
use validator\Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Filter
|
* Class Filter
|
||||||
* @package Snowflake\Snowflake\Route\Filter
|
* @package Snowflake\Snowflake\Route\Filter
|
||||||
*/
|
*/
|
||||||
abstract class Filter extends Application
|
abstract class Filter extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
public array $rules = [];
|
public array $rules = [];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace HttpServer\Route;
|
|||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
use HttpServer\Abstracts\HttpService;
|
||||||
use Snowflake\Exception\ConfigException;
|
use Snowflake\Exception\ConfigException;
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ use Snowflake\Snowflake;
|
|||||||
* Class TcpListen
|
* Class TcpListen
|
||||||
* @package Snowflake\Snowflake\Route
|
* @package Snowflake\Snowflake\Route
|
||||||
*/
|
*/
|
||||||
class Handler extends Application
|
class Handler extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Router */
|
/** @var Router */
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace HttpServer\Route;
|
|||||||
|
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\Http\Request;
|
use HttpServer\Http\Request;
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
|
||||||
|
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
@@ -24,7 +24,7 @@ use function Input;
|
|||||||
* Class Node
|
* Class Node
|
||||||
* @package Snowflake\Snowflake\Route
|
* @package Snowflake\Snowflake\Route
|
||||||
*/
|
*/
|
||||||
class Node extends Application
|
class Node extends HttpService
|
||||||
{
|
{
|
||||||
|
|
||||||
public string $path = '';
|
public string $path = '';
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ namespace HttpServer\Route;
|
|||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use HttpServer\Abstracts\HttpService;
|
||||||
use HttpServer\Http\Request;
|
use HttpServer\Http\Request;
|
||||||
use HttpServer\IInterface\RouterInterface;
|
use HttpServer\IInterface\RouterInterface;
|
||||||
use HttpServer\Application;
|
|
||||||
|
|
||||||
use Snowflake\Abstracts\Config;
|
use Snowflake\Abstracts\Config;
|
||||||
use Snowflake\Exception\ComponentException;
|
use Snowflake\Exception\ComponentException;
|
||||||
@@ -21,7 +21,7 @@ defined('ROUTER_HASH') or define('ROUTER_HASH', 2);
|
|||||||
* Class Router
|
* Class Router
|
||||||
* @package Snowflake\Snowflake\Route
|
* @package Snowflake\Snowflake\Route
|
||||||
*/
|
*/
|
||||||
class Router extends Application implements RouterInterface
|
class Router extends HttpService implements RouterInterface
|
||||||
{
|
{
|
||||||
/** @var Node[] $nodes */
|
/** @var Node[] $nodes */
|
||||||
public array $nodes = [];
|
public array $nodes = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user