فهرست منبع

Update Models\AdminList

Visman 3 سال پیش
والد
کامیت
3628bcf8e5
1فایلهای تغییر یافته به همراه10 افزوده شده و 4 حذف شده
  1. 10 4
      app/Models/AdminList/AdminList.php

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

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