Update Models\SmileyList
This commit is contained in:
parent
e6f50f607e
commit
cf2bd1872a
4 changed files with 18 additions and 12 deletions
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\SmileyList;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\SmileyList\Model as SmileyList;
|
||||
use ForkBB\Models\SmileyList\SmileyList;
|
||||
|
||||
class Delete extends Method
|
||||
{
|
||||
|
|
|
@ -10,16 +10,22 @@ declare(strict_types=1);
|
|||
|
||||
namespace ForkBB\Models\SmileyList;
|
||||
|
||||
use ForkBB\Models\Model as ParentModel;
|
||||
use ForkBB\Models\Model;
|
||||
use RuntimeException;
|
||||
|
||||
class Model extends ParentModel
|
||||
class SmileyList extends Model
|
||||
{
|
||||
/**
|
||||
* Ключ модели для контейнера
|
||||
* @var string
|
||||
*/
|
||||
protected $cKey = 'SmileyList';
|
||||
|
||||
/**
|
||||
* Загружает список смайлов из кеша/БД
|
||||
* Создает кеш
|
||||
*/
|
||||
public function init(): Model
|
||||
public function init(): SmileyList
|
||||
{
|
||||
$list = $this->c->Cache->get('smilies');
|
||||
|
||||
|
@ -39,7 +45,7 @@ class Model extends ParentModel
|
|||
/**
|
||||
* Сбрасывает кеш смайлов
|
||||
*/
|
||||
public function reset(): Model
|
||||
public function reset(): SmileyList
|
||||
{
|
||||
if (true !== $this->c->Cache->delete('smilies')) {
|
||||
throw new RuntimeException('Unable to remove key from cache - smilies');
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\SmileyList;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\SmileyList\Model as SmileyList;
|
||||
use ForkBB\Models\SmileyList\SmileyList;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class Update extends Method
|
||||
|
|
|
@ -198,11 +198,6 @@ return [
|
|||
'BanList/load' => \ForkBB\Models\BanList\Load::class,
|
||||
'BanList/update' => \ForkBB\Models\BanList\Update::class,
|
||||
|
||||
'SmileyListModelLoad' => \ForkBB\Models\SmileyList\Load::class,
|
||||
'SmileyListModelUpdate' => \ForkBB\Models\SmileyList\Update::class,
|
||||
'SmileyListModelInsert' => \ForkBB\Models\SmileyList\Insert::class,
|
||||
'SmileyListModelDelete' => \ForkBB\Models\SmileyList\Delete::class,
|
||||
|
||||
'BBCodeListModel' => [
|
||||
'class' => \ForkBB\Models\BBCodeList\BBCodeList::class,
|
||||
'file' => 'defaultBBCode.php',
|
||||
|
@ -274,6 +269,11 @@ return [
|
|||
'Search/prepare' => \ForkBB\Models\Search\Prepare::class,
|
||||
'Search/truncateIndex' => \ForkBB\Models\Search\TruncateIndex::class,
|
||||
|
||||
'SmileyList/delete' => \ForkBB\Models\SmileyList\Delete::class,
|
||||
'SmileyList/insert' => \ForkBB\Models\SmileyList\Insert::class,
|
||||
'SmileyList/load' => \ForkBB\Models\SmileyList\Load::class,
|
||||
'SmileyList/update' => \ForkBB\Models\SmileyList\Update::class,
|
||||
|
||||
'UserManagerNormUsername' => \ForkBB\Models\User\NormUsername::class,
|
||||
],
|
||||
'multiple' => [
|
||||
|
@ -351,7 +351,7 @@ return [
|
|||
|
||||
'AdminListModel' => \ForkBB\Models\AdminList\AdminList::class,
|
||||
|
||||
'SmileyListModel' => \ForkBB\Models\SmileyList\Model::class,
|
||||
'SmileyListModel' => \ForkBB\Models\SmileyList\SmileyList::class,
|
||||
|
||||
'DBMapModel' => \ForkBB\Models\DBMap\DBMap::class,
|
||||
|
||||
|
|
Loading…
Reference in a new issue