forked from codeigniter4/shield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseModel.php
More file actions
37 lines (27 loc) · 675 Bytes
/
Copy pathBaseModel.php
File metadata and controls
37 lines (27 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
declare(strict_types=1);
namespace CodeIgniter\Shield\Models;
use CodeIgniter\Model;
use CodeIgniter\Shield\Config\Auth;
abstract class BaseModel extends Model
{
use CheckQueryReturnTrait;
/**
* Auth Table names
*/
protected array $tables;
public function __construct()
{
$authConfig = config('Auth');
if (! empty($authConfig->DBGroup)) {
$this->DBGroup = $authConfig->DBGroup;
}
parent::__construct();
}
protected function initialize(): void
{
/** @var Auth $authConfig */
$authConfig = config('Auth');
$this->tables = $authConfig->tables;
}
}