Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
DaoBase | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Database; |
6 | |
7 | use PeServer\Core\Database\IDatabaseContext; |
8 | use PeServer\Core\Log\ILogger; |
9 | use PeServer\Core\Log\Logging; |
10 | use PeServer\Core\Log\NullLogger; |
11 | |
12 | /** |
13 | * DBアクセス基底処理。 |
14 | * |
15 | * こいつを継承してアクセス処理を構築する。 |
16 | */ |
17 | abstract class DaoBase |
18 | { |
19 | #region variable |
20 | |
21 | /** |
22 | * ロガー。 |
23 | */ |
24 | protected readonly ILogger $logger; |
25 | |
26 | #endregion |
27 | |
28 | /** |
29 | * 生成。 |
30 | * |
31 | * @param IDatabaseContext $context 接続処理。 |
32 | */ |
33 | protected function __construct( |
34 | protected readonly IDatabaseContext $context |
35 | ) { |
36 | $this->logger = new NullLogger(); |
37 | } |
38 | } |