This commit is contained in:
2020-09-04 00:41:33 +08:00
parent 622071256e
commit 46f9de1f6a
141 changed files with 105 additions and 73 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace HttpServer\Events;
use Exception;
use HttpServer\Events\Abstracts\Callback;
use Snowflake\Event;
use Snowflake\Exception\ComponentException;
use Snowflake\Snowflake;
use Swoole\Server;
/**
* Class OnAfterReload
* @package HttpServer\Events
*/
class OnAfterReload extends Callback
{
/**
* @param Server $server
* @throws ComponentException
* @throws Exception
*/
public function onHandler(Server $server)
{
$event = Snowflake::app()->getEvent();
if (!$event->exists(Event::SERVER_AFTER_RELOAD)) {
return;
}
$event->trigger(Event::SERVER_AFTER_RELOAD, [$server]);
}
}