This commit is contained in:
2021-03-16 14:37:52 +08:00
parent 9a22a92410
commit d925ca19bb
4 changed files with 39 additions and 25 deletions
+12
View File
@@ -8,6 +8,7 @@ use Exception;
use HttpServer\Abstracts\HttpService;
use HttpServer\IInterface\AuthIdentity;
use HttpServer\Route\Router;
use JetBrains\PhpStorm\Pure;
use ReflectionException;
use Snowflake\Core\ArrayAccess;
@@ -15,6 +16,7 @@ use Snowflake\Core\Json;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
use stdClass;
use Swoole\Server;
use function router;
@@ -437,6 +439,16 @@ class Request extends HttpService
}
/**
* @return mixed
* @throws Exception
*/
public function dispatch(): mixed
{
return $this->is('favicon.ico') ? \send(null) : \router();
}
/**
* @param $request
* @return mixed