改名
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
namespace HttpServer\Http;
|
||||
|
||||
use Exception;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* Class File
|
||||
* @package BeReborn\Http
|
||||
*/
|
||||
class File
|
||||
{
|
||||
@@ -57,7 +57,7 @@ class File
|
||||
return $this->newName;
|
||||
}
|
||||
$param = ['tmp_name' => $this->getTmpPath()];
|
||||
$this->newName = \BeReborn::rename($param);
|
||||
$this->newName = Snowflake::rename($param);
|
||||
return $this->newName;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
namespace HttpServer\Http\Formatter;
|
||||
|
||||
|
||||
use BeReborn\Core\JSON;
|
||||
use Snowflake\Core\JSON;
|
||||
use HttpServer\Application;
|
||||
use Swoole\Http\Response;
|
||||
use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class HtmlFormatter
|
||||
* @package BeReborn\Http\Formatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
*/
|
||||
class HtmlFormatter extends Application implements IFormatter
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class JsonFormatter
|
||||
* @package BeReborn\Http\Formatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
*/
|
||||
class JsonFormatter extends Application implements IFormatter
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ use HttpServer\IInterface\IFormatter;
|
||||
|
||||
/**
|
||||
* Class XmlFormatter
|
||||
* @package BeReborn\Http\Formatter
|
||||
* @package Snowflake\Snowflake\Http\Formatter
|
||||
*/
|
||||
class XmlFormatter extends Application implements IFormatter
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace HttpServer\Http;
|
||||
|
||||
/**
|
||||
* Class HttpHeaders
|
||||
* @package BeReborn\Http
|
||||
* @package Snowflake\Snowflake\Http
|
||||
*/
|
||||
class HttpHeaders
|
||||
{
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
namespace HttpServer\Http;
|
||||
|
||||
use BeReborn\Core\JSON;
|
||||
use Exception;
|
||||
use HttpServer\Exception\RequestException;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* Class HttpParams
|
||||
* @package BeReborn\Http
|
||||
* @package Snowflake\Snowflake\Http
|
||||
*/
|
||||
class HttpParams
|
||||
{
|
||||
@@ -177,7 +177,7 @@ class HttpParams
|
||||
}
|
||||
$param = $this->files[$name];
|
||||
$param['class'] = File::class;
|
||||
return \BeReborn::createObject($param);
|
||||
return Snowflake::createObject($param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ use Snowflake\Core\Help;
|
||||
use Exception;
|
||||
use HttpServer\Application;
|
||||
use HttpServer\IInterface\AuthIdentity;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
defined('REQUEST_OK') or define('REQUEST_OK', 0);
|
||||
defined('REQUEST_FAIL') or define('REQUEST_FAIL', 500);
|
||||
@@ -13,7 +14,7 @@ defined('REQUEST_FAIL') or define('REQUEST_FAIL', 500);
|
||||
/**
|
||||
* Class HttpRequest
|
||||
*
|
||||
* @package BeReborn\HttpRequest
|
||||
* @package Snowflake\Snowflake\HttpRequest
|
||||
*
|
||||
* @property-read $isPost
|
||||
* @property-read $isGet
|
||||
@@ -284,14 +285,7 @@ class Request extends Application
|
||||
*/
|
||||
public function getIsHttp()
|
||||
{
|
||||
if (!app()->has('socket')) {
|
||||
return false;
|
||||
}
|
||||
$socket = \BeReborn::$app->getSocket()->getServer();
|
||||
if (empty($this->fd)) {
|
||||
return false;
|
||||
}
|
||||
return $socket->exist($this->fd) && !$socket->isEstablished($this->fd);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@ use Swoole\Http\Response as SResponse;
|
||||
|
||||
/**
|
||||
* Class Response
|
||||
* @package BeReborn\Http
|
||||
* @package Snowflake\Snowflake\Http
|
||||
*/
|
||||
class Response extends Application
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user