1 | <?php |
||
2 | |||
3 | /** |
||
4 | * This file is part of Cycle Database package. |
||
5 | * |
||
6 | * For the full copyright and license information, please view the LICENSE |
||
7 | * file that was distributed with this source code. |
||
8 | */ |
||
9 | |||
10 | declare(strict_types=1); |
||
11 | |||
12 | namespace Cycle\Database\Config\SQLServer; |
||
13 | |||
14 | use Cycle\Database\Config\PDOConnectionConfig; |
||
15 | |||
16 | /** |
||
17 | * @psalm-type IsolationLevelType = \PDO::SQLSRV_TXN_* |
||
18 | * |
||
19 | * @psalm-import-type PDOFlag from PDOConnectionConfig |
||
20 | */ |
||
21 | abstract class ConnectionConfig extends PDOConnectionConfig |
||
22 | { |
||
23 | /** |
||
24 | * General driver specific PDO options. |
||
25 | * |
||
26 | * @var array<PDOFlag, mixed> |
||
27 | */ |
||
28 | protected const DEFAULT_PDO_OPTIONS = [ |
||
29 | \PDO::ATTR_CASE => \PDO::CASE_NATURAL, |
||
30 | \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, |
||
31 | \PDO::ATTR_STRINGIFY_FETCHES => false, |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @param non-empty-string|null $user |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
36 | * @param non-empty-string|null $password |
||
37 | */ |
||
38 | public function __construct( |
||
39 | ?string $user = null, |
||
40 | ?string $password = null, |
||
41 | array $options = [], |
||
42 | ) { |
||
43 | parent::__construct($user, $password, $options); |
||
44 | } |
||
45 | |||
46 | public function getName(): string |
||
47 | { |
||
48 | return 'sqlsrv'; |
||
49 | 6 | } |
|
50 | } |
||
51 |