Browse Source

Update Models\BanList

Visman 3 years ago
parent
commit
5f1da4f110

+ 10 - 4
app/Models/BanList/Model.php → app/Models/BanList/BanList.php

@@ -10,17 +10,23 @@ declare(strict_types=1);
 
 
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
-use ForkBB\Models\Model as ParentModel;
+use ForkBB\Models\Model;
 use InvalidArgumentException;
 use InvalidArgumentException;
 use RuntimeException;
 use RuntimeException;
 
 
-class Model extends ParentModel
+class BanList extends Model
 {
 {
+    /**
+     * Ключ модели для контейнера
+     * @var string
+     */
+    protected $cKey = 'BanList';
+
     /**
     /**
      * Загружает список банов из кеша/БД
      * Загружает список банов из кеша/БД
      * Создает кеш
      * Создает кеш
      */
      */
-    public function init(): Model
+    public function init(): BanList
     {
     {
         $list = $this->c->Cache->get('banlist');
         $list = $this->c->Cache->get('banlist');
 
 
@@ -89,7 +95,7 @@ class Model extends ParentModel
     /**
     /**
      * Сбрасывает кеш банов
      * Сбрасывает кеш банов
      */
      */
-    public function reset(): Model
+    public function reset(): BanList
     {
     {
         if (true !== $this->c->Cache->delete('banlist')) {
         if (true !== $this->c->Cache->delete('banlist')) {
             throw new RuntimeException('Unable to remove key from cache - banlist');
             throw new RuntimeException('Unable to remove key from cache - banlist');

+ 1 - 1
app/Models/BanList/Check.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\User\Model as User;
+use ForkBB\Models\User\User;
 
 
 class Check extends Method
 class Check extends Method
 {
 {

+ 1 - 1
app/Models/BanList/Delete.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\BanList\Model as BanList;
+use ForkBB\Models\BanList\BanList;
 
 
 class Delete extends Method
 class Delete extends Method
 {
 {

+ 1 - 1
app/Models/BanList/Insert.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\BanList\Model as BanList;
+use ForkBB\Models\BanList\BanList;
 use InvalidArgumentException;
 use InvalidArgumentException;
 
 
 class Insert extends Method
 class Insert extends Method

+ 1 - 1
app/Models/BanList/IsBanned.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\User\Model as User;
+use ForkBB\Models\User\User;
 use InvalidArgumentException;
 use InvalidArgumentException;
 
 
 class IsBanned extends Method
 class IsBanned extends Method

+ 1 - 1
app/Models/BanList/Load.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\BanList\Model as BanList;
+use ForkBB\Models\BanList\BanList;
 use RuntimeException;
 use RuntimeException;
 
 
 class Load extends Method
 class Load extends Method

+ 1 - 1
app/Models/BanList/Update.php

@@ -11,7 +11,7 @@ declare(strict_types=1);
 namespace ForkBB\Models\BanList;
 namespace ForkBB\Models\BanList;
 
 
 use ForkBB\Models\Method;
 use ForkBB\Models\Method;
-use ForkBB\Models\BanList\Model as BanList;
+use ForkBB\Models\BanList\BanList;
 use InvalidArgumentException;
 use InvalidArgumentException;
 
 
 class Update extends Method
 class Update extends Method