1 Star 0 Fork 0

王宏 / easyswoole-miaosha

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
EasySwooleEvent.php 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
15310819874@189.cn 提交于 2018-07-31 07:38 . 初始化
<?php
/**
* Created by PhpStorm.
* User: yf
* Date: 2018/1/9
* Time: 下午1:04
*/
namespace EasySwoole;
use App\ChenWebSocket\User;
use App\Common\MaintainRelationship;
use \EasySwoole\Core\AbstractInterface\EventInterface;
use EasySwoole\Core\Component\Pool\PoolManager;
use EasySwoole\Core\Component\Rpc\Server;
use EasySwoole\Core\Swoole\EventHelper;
use EasySwoole\Core\Swoole\Memory\TableManager;
use \EasySwoole\Core\Swoole\ServerManager;
use \EasySwoole\Core\Swoole\EventRegister;
use \EasySwoole\Core\Http\Request;
use \EasySwoole\Core\Http\Response;
use EasySwoole\Core\Swoole\Time\Timer;
use think\Db;
Class EasySwooleEvent implements EventInterface {
public static function frameInitialize(): void
{
// TODO: Implement frameInitialize() method.
date_default_timezone_set('Asia/Shanghai');
//引入全局方法
include './App/function.php';
//TP-ORM设置mysql数据库
$dbConfig = Config::getInstance()->getConf('MYSQL');
Db::setConfig($dbConfig);
}
public static function mainServerCreate(ServerManager $server,EventRegister $register): void
{
// TODO: Implement mainServerCreate() method.
}
public static function onRequest(Request $request,Response $response): void
{
// TODO: Implement onRequest() method.
}
public static function afterAction(Request $request,Response $response): void
{
// TODO: Implement afterAction() method.
}
}
1
https://gitee.com/chen_code/easyswoole-miaosha.git
git@gitee.com:chen_code/easyswoole-miaosha.git
chen_code
easyswoole-miaosha
easyswoole-miaosha
master

搜索帮助