改名
This commit is contained in:
+17
-1
@@ -3,6 +3,7 @@
|
||||
defined('APP_PATH') or define('APP_PATH', __DIR__ . '/../../');
|
||||
|
||||
use HttpServer\Http\Response;
|
||||
use HttpServer\Route\Router;
|
||||
use Snowflake\Error\Logger;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Snowflake;
|
||||
@@ -405,7 +406,7 @@ if (!function_exists('name')) {
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
function name($name)
|
||||
function name(string $name)
|
||||
{
|
||||
swoole_set_process_name($name);
|
||||
}
|
||||
@@ -505,6 +506,21 @@ if (!function_exists('merge')) {
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('router')) {
|
||||
|
||||
|
||||
/**
|
||||
* @return Router
|
||||
* @throws ComponentException
|
||||
*/
|
||||
function router()
|
||||
{
|
||||
return Snowflake::app()->getRouter();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('jTraceEx')) {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user