Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace Doctrine\DBAL\Driver\Mysqli\Initializer;
6
 
7
use Doctrine\DBAL\Driver\Mysqli\Initializer;
8
use mysqli;
621 lars 9
use SensitiveParameter;
148 lars 10
 
11
final class Secure implements Initializer
12
{
13
    private string $key;
14
    private string $cert;
15
    private string $ca;
16
    private string $capath;
17
    private string $cipher;
18
 
621 lars 19
    public function __construct(
20
        #[SensitiveParameter]
21
        string $key,
22
        string $cert,
23
        string $ca,
24
        string $capath,
25
        string $cipher
26
    ) {
148 lars 27
        $this->key    = $key;
28
        $this->cert   = $cert;
29
        $this->ca     = $ca;
30
        $this->capath = $capath;
31
        $this->cipher = $cipher;
32
    }
33
 
34
    public function initialize(mysqli $connection): void
35
    {
36
        $connection->ssl_set($this->key, $this->cert, $this->ca, $this->capath, $this->cipher);
37
    }
38
}