Files
kiri-core/system/Processes.php
T

46 lines
619 B
PHP
Raw Normal View History

2020-08-31 01:27:08 +08:00
<?php
namespace Snowflake;
use Exception;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use Snowflake\Abstracts\Component;
use Swoole\Process\Pool;
/**
* Class Processes
* @package Snowflake
*/
class Processes extends Component
{
public $processes = [];
/**
* 构建服务
* @throws Exception
*/
public function initCore()
{
2020-09-02 11:46:19 +08:00
$manager = Snowflake::get()->server;
2020-08-31 12:38:32 +08:00
2020-09-02 11:38:47 +08:00
$serverConfig = Config::get('servers', true);
2020-08-31 01:27:08 +08:00
2020-09-02 11:38:47 +08:00
return $manager->initCore($serverConfig);
2020-08-31 01:27:08 +08:00
}
/**
* @throws Exception
*/
public function start()
{
$server = $this->initCore();
$server->start();
}
}