This commit is contained in:
2021-07-21 19:05:11 +08:00
parent 7dd1322ea4
commit de937ace09
5 changed files with 54 additions and 4 deletions
+14
View File
@@ -6,6 +6,7 @@ namespace Server\Abstracts;
use Closure;
use Exception;
use Snowflake\Event;
use Snowflake\Snowflake;
@@ -20,6 +21,19 @@ abstract class Server
protected array $_events = [];
protected Event $_event;
/**
* Server constructor.
* @throws Exception
*/
public function __construct()
{
$this->_event = Snowflake::getApp('event');
}
/**
* @param string $name
* @param array|null $events