modify
This commit is contained in:
@@ -10,8 +10,8 @@ use HttpServer\Http\Formatter\HtmlFormatter;
|
||||
use HttpServer\Http\Formatter\JsonFormatter;
|
||||
use HttpServer\Http\Formatter\XmlFormatter;
|
||||
use HttpServer\IInterface\IFormatter;
|
||||
use Snowflake\Core\Help;
|
||||
use Snowflake\Snowflake;
|
||||
use Kiri\Core\Help;
|
||||
use Kiri\Kiri;
|
||||
use Swoole\Http\Response as SResponse;
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ class CoroutineResponse extends HttpService
|
||||
/** @var IFormatter $class */
|
||||
$class = $this->_format_maps[$this->format] ?? HtmlFormatter::class;
|
||||
|
||||
$di = Snowflake::getDi()->get($class);
|
||||
$di = Kiri::getDi()->get($class);
|
||||
$context = $di->send($context)->getData();
|
||||
}
|
||||
return $context;
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
namespace HttpServer\Http;
|
||||
|
||||
use Exception;
|
||||
use Snowflake\Snowflake;
|
||||
use Kiri\Kiri;
|
||||
|
||||
/**
|
||||
* Class File
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace HttpServer\Http\Formatter;
|
||||
|
||||
use Exception;
|
||||
use HttpServer\Abstracts\HttpService;
|
||||
use Snowflake\Core\Json;
|
||||
use Kiri\Core\Json;
|
||||
use Swoole\Http\Response;
|
||||
use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class HtmlFormatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
* @package Kiri\Kiri\Http\Formatter
|
||||
*/
|
||||
class HtmlFormatter extends HttpService implements IFormatter
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class JsonFormatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
* @package Kiri\Kiri\Http\Formatter
|
||||
*/
|
||||
class JsonFormatter extends HttpService implements IFormatter
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class XmlFormatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
* @package Kiri\Kiri\Http\Formatter
|
||||
*/
|
||||
class XmlFormatter extends HttpService implements IFormatter
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace HttpServer\Http;
|
||||
|
||||
/**
|
||||
* Class HttpHeaders
|
||||
* @package Snowflake\Snowflake\Http
|
||||
* @package Kiri\Kiri\Http
|
||||
*/
|
||||
trait HttpHeaders
|
||||
{
|
||||
|
||||
@@ -12,14 +12,14 @@ namespace HttpServer\Http;
|
||||
use Exception;
|
||||
use HttpServer\Exception\RequestException;
|
||||
use ReflectionException;
|
||||
use Snowflake\Core\Json;
|
||||
use Snowflake\Core\Xml;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Snowflake;
|
||||
use Kiri\Core\Json;
|
||||
use Kiri\Core\Xml;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Kiri\Kiri;
|
||||
|
||||
/**
|
||||
* Class HttpParams
|
||||
* @package Snowflake\Snowflake\Http
|
||||
* @package Kiri\Kiri\Http
|
||||
*/
|
||||
trait HttpParams
|
||||
{
|
||||
@@ -204,7 +204,7 @@ trait HttpParams
|
||||
$param = $this->_files[$name] ?? null;
|
||||
if (!empty($param)) {
|
||||
$param['class'] = File::class;
|
||||
return Snowflake::createObject($param);
|
||||
return Kiri::createObject($param);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use HttpServer\IInterface\AuthIdentity;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Server\RequestInterface;
|
||||
use Server\ServerManager;
|
||||
use Snowflake\Core\Json;
|
||||
use Kiri\Core\Json;
|
||||
|
||||
defined('REQUEST_OK') or define('REQUEST_OK', 0);
|
||||
defined('REQUEST_FAIL') or define('REQUEST_FAIL', 500);
|
||||
@@ -18,7 +18,7 @@ defined('REQUEST_FAIL') or define('REQUEST_FAIL', 500);
|
||||
/**
|
||||
* Class HttpRequest
|
||||
*
|
||||
* @package Snowflake\Snowflake\HttpRequest
|
||||
* @package Kiri\Kiri\HttpRequest
|
||||
*
|
||||
* @property-read $isPost
|
||||
* @property-read $isGet
|
||||
|
||||
@@ -17,12 +17,12 @@ use HttpServer\Http\Formatter\JsonFormatter;
|
||||
use HttpServer\Http\Formatter\XmlFormatter;
|
||||
use HttpServer\IInterface\IFormatter;
|
||||
use Server\ResponseInterface;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Kiri\Exception\NotFindClassException;
|
||||
use Swoole\Http\Response as SResponse;
|
||||
|
||||
/**
|
||||
* Class Response
|
||||
* @package Snowflake\Snowflake\Http
|
||||
* @package Kiri\Kiri\Http
|
||||
*/
|
||||
class Response extends HttpService implements ResponseInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user