Update Models\PM

This commit is contained in:
Visman 2021-12-02 22:36:34 +07:00
parent 40fb2b3f98
commit 0e72ea4db1
7 changed files with 41 additions and 15 deletions

View file

@ -15,7 +15,7 @@ use ForkBB\Models\DataModel;
use ForkBB\Models\PM\Cnst;
use ForkBB\Models\PM\PPost;
use ForkBB\Models\PM\PTopic;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use InvalidArgumentException;
use RuntimeException;

View file

@ -13,12 +13,18 @@ namespace ForkBB\Models\PM;
use ForkBB\Core\Container;
use ForkBB\Models\Model;
use ForkBB\Models\PM\Cnst;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use InvalidArgumentException;
use RuntimeException;
class PBlock extends Model
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'PBlock';
/**
* @var array
*/

View file

@ -12,17 +12,23 @@ namespace ForkBB\Models\PM;
use ForkBB\Core\Container;
use ForkBB\Models\DataModel;
use ForkBB\Models\Model as ParentModel;
use ForkBB\Models\Model;
use ForkBB\Models\PM\Cnst;
use ForkBB\Models\PM\PBlock;
use ForkBB\Models\PM\PPost;
use ForkBB\Models\PM\PTopic;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use InvalidArgumentException;
use RuntimeException;
class Model extends ParentModel
class PM extends Model
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'PMS';
/**
* @var array
*/

View file

@ -14,12 +14,18 @@ use ForkBB\Core\Container;
use ForkBB\Models\DataModel;
use ForkBB\Models\PM\Cnst;
use ForkBB\Models\PM\PTopic;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use InvalidArgumentException;
use RuntimeException;
class PPost extends DataModel
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'PPost';
public function __construct(Container $container)
{
parent::__construct($container);

View file

@ -13,12 +13,18 @@ namespace ForkBB\Models\PM;
use ForkBB\Core\Container;
use ForkBB\Models\DataModel;
use ForkBB\Models\PM\Cnst;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use PDO;
use RuntimeException;
class PTopic extends DataModel
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'PTopic';
public function __construct(Container $container)
{
parent::__construct($container);

View file

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace ForkBB\Models\PM;
use ForkBB\Models\Method;
use ForkBB\Models\User\Model as User;
use ForkBB\Models\User\User;
use RuntimeException;
class UpdateUsername extends Method

View file

@ -151,7 +151,7 @@ return [
'search' => \ForkBB\Models\Search\Model::class,
'subscriptions' => \ForkBB\Models\Subscription\Model::class,
'bbcode' => '@BBCodeListModel:init',
'pms' => \ForkBB\Models\PM\Model::class,
'pms' => \ForkBB\Models\PM\PM::class,
'Csrf' => [
'class' => \ForkBB\Core\Csrf::class,
@ -242,11 +242,13 @@ return [
'Online*updateUsername' => \ForkBB\Models\Online\UpdateUsername::class,
'PBlockModel' => \ForkBB\Models\PM\PBlock::class,
'PMPTopicCalcStat' => \ForkBB\Models\PM\CalcStat::class,
'PMModelLoad' => \ForkBB\Models\PM\Load::class,
'PMModelSave' => \ForkBB\Models\PM\Save::class,
'PMModelDelete' => \ForkBB\Models\PM\Delete::class,
'PMModelUpdateUsername' => \ForkBB\Models\PM\UpdateUsername::class,
'PMS*delete' => \ForkBB\Models\PM\Delete::class,
'PMS*load' => \ForkBB\Models\PM\Load::class,
'PMS*save' => \ForkBB\Models\PM\Save::class,
'PMS*updateUsername' => \ForkBB\Models\PM\UpdateUsername::class,
'PTopic*CalcStat' => \ForkBB\Models\PM\CalcStat::class,
'UserManagerNormUsername' => \ForkBB\Models\User\NormUsername::class,
],