加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
EasySwooleEvent.php 873 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangjianwen 提交于 2022-03-09 18:20 . first
<?php
namespace EasySwoole\EasySwoole;
use App\Event\Initialize;
use App\Event\MainServerCreate;
use EasySwoole\Actor\Exception\InvalidActor;
use EasySwoole\EasySwoole\AbstractInterface\Event;
use EasySwoole\EasySwoole\Swoole\EventRegister;
use EasySwoole\RedisPool\Exception\Exception;
use EasySwoole\RedisPool\RedisPoolException;
class EasySwooleEvent implements Event
{
public static function initialize()
{
date_default_timezone_set('Asia/Shanghai');
Initialize::getInstance()->initialize();
}
/**
* @throws Exception
* @throws \EasySwoole\Pool\Exception\Exception
* @throws \EasySwoole\Socket\Exception\Exception
* @throws RedisPoolException|InvalidActor
*/
public static function mainServerCreate(EventRegister $register)
{
MainServerCreate::getInstance()->initialize($register);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化