From 12d2533139802dd51b5bbec9de4791da61e4880c Mon Sep 17 00:00:00 2001 From: Zi Xing Date: Fri, 21 Jan 2022 19:04:32 -0500 Subject: [PATCH] Added UserWarningManager --- src/Synical/Synical.php | 15 +++++++++++++++ src/Synical/package.json | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/Synical/Synical.php b/src/Synical/Synical.php index 707f410..c9dc2da 100644 --- a/src/Synical/Synical.php +++ b/src/Synical/Synical.php @@ -9,6 +9,7 @@ use acm2\Objects\Schema; use mysqli; use Synical\Managers\ChatMemberCacheManager; + use Synical\Managers\UserWarningManager; class Synical { @@ -32,6 +33,11 @@ */ private $ChatMemberCacheManager; + /** + * @var UserWarningManager + */ + private $UserWarningManager; + /** * @throws ConfigurationNotDefinedException */ @@ -56,6 +62,7 @@ $this->DatabaseConnection = null; $this->ChatMemberCacheManager = new ChatMemberCacheManager($this); + $this->UserWarningManager = new UserWarningManager($this); } /** @@ -106,4 +113,12 @@ { return $this->ChatMemberCacheManager; } + + /** + * @return UserWarningManager + */ + public function getUserWarningManager(): UserWarningManager + { + return $this->UserWarningManager; + } } \ No newline at end of file diff --git a/src/Synical/package.json b/src/Synical/package.json index 24b4f48..b11d558 100644 --- a/src/Synical/package.json +++ b/src/Synical/package.json @@ -49,6 +49,14 @@ "required": true, "file": "Exceptions/DatabaseException.php" }, + { + "required": true, + "file": "Exceptions/UserWarningRecordNotFoundException.php" + }, + { + "required": true, + "file": "Exceptions/TooManyWarningsException.php" + }, { "required": true, "file": "Exceptions/CannotUpdateChatMembersCacheException.php" @@ -57,6 +65,14 @@ "required": true, "file": "Exceptions/ChatMemberCacheRecordNotFoundException.php" }, + { + "required": true, + "file": "Objects/UserWarning/Warning.php" + }, + { + "required": true, + "file": "Objects/UserWarning.php" + }, { "required": true, "file": "Objects/ChatMemberCache.php" @@ -65,6 +81,10 @@ "required": true, "file": "Objects/AdminCacheRecord/AdministratorPermissions.php" }, + { + "required": true, + "file": "Managers/UserWarningManager.php" + }, { "required": true, "file": "Managers/ChatMemberCacheManager.php"