first commit

This commit is contained in:
2021-11-03 15:17:52 +08:00
commit 000d084abf
48 changed files with 2317 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace Server\Events;
class OnAfterCommandExecute
{
/**
* @param mixed $data
*/
public function __construct(public mixed $data)
{
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnAfterReload
{
/**
* @param Server $server
*/
public function __construct(public Server $server)
{
}
}
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace Server\Events;
class OnAfterWorkerStart
{
}
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace Server\Events;
class OnBeforeCommandExecute
{
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnBeforeReload
{
/**
* @param Server $server
*/
public function __construct(public Server $server)
{
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnBeforeShutdown
{
/**
* @param Server|null $server
*/
public function __construct(public ?Server $server = null)
{
}
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace Server\Events;
class OnBeforeWorkerStart
{
public function __construct(public int $workerId)
{
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnManagerStart
{
/**
* @param Server $server
*/
public function __construct(public Server $server)
{
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnManagerStop
{
/**
* @param Server $server
*/
public function __construct(public Server $server)
{
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnShutdown
{
/**
* @param Server|null $server
*/
public function __construct(public ?Server $server = null)
{
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Server\Events;
use Swoole\Server;
class OnStart
{
/**
* @param Server $server
*/
public function __construct(public Server $server)
{
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Server\Events;
use Swoole\Server;
/**
*
*/
class OnTaskerStart
{
/**
* @param Server $server
* @param int $workerId
*/
public function __construct(public Server $server, public int $workerId)
{
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Server\Events;
use Swoole\Server;
/**
*
*/
class OnWorkerError
{
/**
* @param Server $server
* @param int $worker_id
* @param int $worker_pid
* @param int $exit_code
* @param int $signal
*/
public function __construct(public Server $server, public int $worker_id, public int $worker_pid, public int $exit_code, public int $signal)
{
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Server\Events;
use Swoole\Server;
/**
*
*/
class OnWorkerExit
{
/**
* @param Server $server
* @param int $workerId
*/
public function __construct(public Server $server, public int $workerId)
{
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Server\Events;
use Swoole\Server;
/**
*
*/
class OnWorkerStart
{
/**
* @param Server $server
* @param int $workerId
*/
public function __construct(public Server $server, public int $workerId)
{
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Server\Events;
use Swoole\Server;
/**
*
*/
class OnWorkerStop
{
/**
* @param Server $server
* @param int $workerId
*/
public function __construct(public Server $server, public int $workerId)
{
}
}