代码拉取完成,页面将自动刷新
<?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.
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。