This commit is contained in:
2020-11-04 19:28:40 +08:00
parent dc2216a8b9
commit d533102a77
4 changed files with 124 additions and 69 deletions
+33 -1
View File
@@ -201,7 +201,7 @@ if (!function_exists('fire')) {
* @throws ComponentException
* @throws Exception
*/
function fire(string $event,array $params = [])
function fire(string $event, array $params = [])
{
$logger = Snowflake::app()->getEvent();
$logger->trigger($event, $params);
@@ -584,3 +584,35 @@ if (!function_exists('jTraceEx')) {
}
if (!function_exists('swoole_substr_json_decode')) {
/**
* @param $packet
* @param int $length
* @return mixed
*/
function swoole_substr_json_decode($packet, $length = 0)
{
return json_decode($packet, true);
}
}
if (!function_exists('swoole_substr_unserialize')) {
/**
* @param $packet
* @param int $length
* @return mixed
*/
function swoole_substr_unserialize($packet, $length = 0)
{
return unserialize($packet);
}
}