改名
This commit is contained in:
@@ -11,7 +11,7 @@ namespace HttpServer\Http\Formatter;
|
||||
|
||||
|
||||
use Exception;
|
||||
use Snowflake\Core\JSON;
|
||||
use Snowflake\Core\Json;
|
||||
use HttpServer\Application;
|
||||
use Swoole\Http\Response;
|
||||
use HttpServer\IInterface\IFormatter;
|
||||
@@ -38,7 +38,7 @@ class HtmlFormatter extends Application implements IFormatter
|
||||
public function send($context): static
|
||||
{
|
||||
if (!is_string($context)) {
|
||||
$context = JSON::encode($context);
|
||||
$context = Json::encode($context);
|
||||
}
|
||||
$this->data = $context;
|
||||
return $this;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace HttpServer\Http;
|
||||
use Exception;
|
||||
use HttpServer\Exception\RequestException;
|
||||
use Snowflake\Core\Help;
|
||||
use Snowflake\Core\JSON;
|
||||
use Snowflake\Core\Json;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
@@ -130,11 +130,11 @@ class HttpParams
|
||||
{
|
||||
$data = $this->array($name);
|
||||
if (empty($data)) {
|
||||
return JSON::encode([]);
|
||||
return Json::encode([]);
|
||||
} else if (!is_array($data)) {
|
||||
return JSON::encode([]);
|
||||
return Json::encode([]);
|
||||
}
|
||||
return JSON::encode($data);
|
||||
return Json::encode($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ use HttpServer\Application;
|
||||
use HttpServer\IInterface\AuthIdentity;
|
||||
|
||||
use ReflectionException;
|
||||
use Snowflake\Core\JSON;
|
||||
use Snowflake\Core\Json;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Snowflake;
|
||||
@@ -415,7 +415,7 @@ class Request extends Application
|
||||
*/
|
||||
public function isNotFound(): bool
|
||||
{
|
||||
return JSON::to(404, 'Page ' . $this->getUri() . ' not found.');
|
||||
return Json::to(404, 'Page ' . $this->getUri() . ' not found.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user