Update Models\Censorship
This commit is contained in:
parent
0c44e2365c
commit
6d626ea84d
2 changed files with 11 additions and 5 deletions
|
@ -10,16 +10,22 @@ declare(strict_types=1);
|
|||
|
||||
namespace ForkBB\Models\Censorship;
|
||||
|
||||
use ForkBB\Models\Model as ParentModel;
|
||||
use ForkBB\Models\Model;
|
||||
use RuntimeException;
|
||||
|
||||
class Model extends ParentModel
|
||||
class Censorship extends Model
|
||||
{
|
||||
/**
|
||||
* Ключ модели для контейнера
|
||||
* @var string
|
||||
*/
|
||||
protected $cKey = 'Censorship';
|
||||
|
||||
/**
|
||||
* Загружает список цензуры из кеша/БД
|
||||
* Создает кеш
|
||||
*/
|
||||
public function init(): Model
|
||||
public function init(): Censorship
|
||||
{
|
||||
if ('1' == $this->c->config->o_censoring) {
|
||||
$list = $this->c->Cache->get('censorship');
|
||||
|
@ -54,7 +60,7 @@ class Model extends ParentModel
|
|||
/**
|
||||
* Сбрасывает кеш цензуры
|
||||
*/
|
||||
public function reset(): Model
|
||||
public function reset(): Censorship
|
||||
{
|
||||
if (true !== $this->c->Cache->delete('censorship')) {
|
||||
throw new RuntimeException('Unable to remove key from cache - censorship');
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Censorship;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\Censorship\Model as Censorship;
|
||||
use ForkBB\Models\Censorship\Censorship;
|
||||
use PDO;
|
||||
use RuntimeException;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue