改名
This commit is contained in:
@@ -9,6 +9,7 @@ use Annotation\Aspect;
|
|||||||
use Annotation\Route\RpcProducer;
|
use Annotation\Route\RpcProducer;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use HttpServer\Exception\RequestException;
|
||||||
use HttpServer\Http\Request;
|
use HttpServer\Http\Request;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
@@ -194,7 +195,7 @@ class Node
|
|||||||
public function setParameters(): static
|
public function setParameters(): static
|
||||||
{
|
{
|
||||||
$container = Snowflake::getDi();
|
$container = Snowflake::getDi();
|
||||||
if (empty($this->_handler)){
|
if (empty($this->_handler)) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
$dispatcher = $this->_handler;
|
$dispatcher = $this->_handler;
|
||||||
@@ -393,7 +394,7 @@ class Node
|
|||||||
{
|
{
|
||||||
$handlerProviders = $this->getHandlerProviders()->get($this->sourcePath, $this->method);
|
$handlerProviders = $this->getHandlerProviders()->get($this->sourcePath, $this->method);
|
||||||
if (empty($handlerProviders)) {
|
if (empty($handlerProviders)) {
|
||||||
return '<h2>HTTP 404 Not Found</h2><hr><i>Powered by Swoole</i>';
|
throw new RequestException('<h2>HTTP 404 Not Found</h2><hr><i>Powered by Swoole</i>', 404);
|
||||||
}
|
}
|
||||||
return call_user_func($handlerProviders, \request());
|
return call_user_func($handlerProviders, \request());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user