Update Models\Config
This commit is contained in:
parent
6d626ea84d
commit
698910330a
4 changed files with 12 additions and 6 deletions
|
@ -13,13 +13,19 @@ namespace ForkBB\Models\Config;
|
|||
use ForkBB\Models\DataModel;
|
||||
use RuntimeException;
|
||||
|
||||
class Model extends DataModel
|
||||
class Config extends DataModel
|
||||
{
|
||||
/**
|
||||
* Ключ модели для контейнера
|
||||
* @var string
|
||||
*/
|
||||
protected $cKey = 'Config';
|
||||
|
||||
/**
|
||||
* Заполняет модель данными из кеша/БД
|
||||
* Создает кеш
|
||||
*/
|
||||
public function init(): Model
|
||||
public function init(): Config
|
||||
{
|
||||
$config = $this->c->Cache->get('config');
|
||||
|
||||
|
@ -39,7 +45,7 @@ class Model extends DataModel
|
|||
/**
|
||||
* Сбрасывает кеш конфига
|
||||
*/
|
||||
public function reset(): Model
|
||||
public function reset(): Config
|
||||
{
|
||||
if (true !== $this->c->Cache->delete('config')) {
|
||||
throw new RuntimeException('Unable to remove key from cache - config');
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Config;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\Config\Model as Config;
|
||||
use ForkBB\Models\Config\Config;
|
||||
|
||||
class Install extends Method
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Config;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\Config\Model as Config;
|
||||
use ForkBB\Models\Config\Config;
|
||||
use PDO;
|
||||
use RuntimeException;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ declare(strict_types=1);
|
|||
namespace ForkBB\Models\Config;
|
||||
|
||||
use ForkBB\Models\Method;
|
||||
use ForkBB\Models\Config\Model as Config;
|
||||
use ForkBB\Models\Config\Config;
|
||||
|
||||
class Save extends Method
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue