Update Models\Forum
This commit is contained in:
parent
1dfbbf0382
commit
9cea27c9e4
9 changed files with 30 additions and 19 deletions
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use RuntimeException;
|
||||
|
||||
class CalcStat extends Method
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace ForkBB\Models\Forum;
|
|||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\DataModel;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\User\Model as User;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use ForkBB\Models\User\User;
|
||||
use InvalidArgumentException;
|
||||
use RuntimeException;
|
||||
|
||||
|
|
|
@ -11,14 +11,19 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\DataModel;
|
||||
use ForkBB\Models\User\Model as User;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\User\User;
|
||||
use PDO;
|
||||
use RuntimeException;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class Model extends DataModel
|
||||
class Forum extends DataModel
|
||||
{
|
||||
/**
|
||||
* Ключ модели для контейнера
|
||||
* @var string
|
||||
*/
|
||||
protected $cKey = 'Forum';
|
||||
|
||||
/**
|
||||
* Получение родительского раздела
|
||||
*/
|
|
@ -10,13 +10,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\ManagerModel;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\Group\Model as Group;
|
||||
use ForkBB\Models\Manager;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use ForkBB\Models\Group\Group;
|
||||
use RuntimeException;
|
||||
|
||||
class Manager extends ManagerModel
|
||||
class Forums extends Manager
|
||||
{
|
||||
/**
|
||||
* Ключ модели для контейнера
|
||||
* @var string
|
||||
*/
|
||||
protected $cKey = 'Forums';
|
||||
|
||||
/**
|
||||
* Закешированные данные по разделам
|
||||
* @var array
|
||||
|
@ -35,7 +41,7 @@ class Manager extends ManagerModel
|
|||
* Инициализация списка разделов
|
||||
* Обновляет кеш разделов
|
||||
*/
|
||||
public function init(Group $group = null): Manager
|
||||
public function init(Group $group = null): Forums
|
||||
{
|
||||
if (null === $group) {
|
||||
$gid = $this->c->user->group_id;
|
||||
|
@ -132,7 +138,7 @@ class Manager extends ManagerModel
|
|||
/**
|
||||
* Сбрасывает кеш
|
||||
*/
|
||||
public function reset(): Manager
|
||||
public function reset(): Forums
|
||||
{
|
||||
if (true !== $this->c->Cache->delete('forums_mark')) {
|
||||
throw new RuntimeException('Unable to remove key from cache - forums_mark');
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
|
||||
class LoadTree extends Action
|
||||
{
|
||||
|
|
|
@ -11,8 +11,8 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\User\Model as User;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use ForkBB\Models\User\User;
|
||||
use RuntimeException;
|
||||
|
||||
class Markread extends Action
|
||||
|
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\Group\Model as Group;
|
||||
use ForkBB\Models\Group\Group;
|
||||
|
||||
class Refresh extends Action
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use RuntimeException;
|
||||
|
||||
class Save extends Action
|
||||
|
|
|
@ -11,8 +11,8 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Forum;
|
||||
|
||||
use ForkBB\Models\Action;
|
||||
use ForkBB\Models\Forum\Model as Forum;
|
||||
use ForkBB\Models\User\Model as User;
|
||||
use ForkBB\Models\Forum\Forum;
|
||||
use ForkBB\Models\User\User;
|
||||
use RuntimeException;
|
||||
|
||||
class UpdateUsername extends Action
|
||||
|
|
Loading…
Reference in a new issue