This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+4 -2
View File
@@ -7,6 +7,7 @@ namespace HttpServer\Route;
use Exception;
use HttpServer\Application;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
/**
@@ -43,9 +44,10 @@ class Handler extends Application
/**
* @param $route
* @param $handler
* @return Handler
* @return Handler|Node|null
* @throws ConfigException
*/
public function handler($route, $handler)
public function handler($route, $handler): Handler|Node|null
{
return $this->router->addRoute($route, $handler, 'receive');
}