1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Copyright 2017 American Express Travel Related Services Company, Inc. |
5
|
|
|
* |
6
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
7
|
|
|
* you may not use this file except in compliance with the License. |
8
|
|
|
* You may obtain a copy of the License at |
9
|
|
|
* |
10
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
11
|
|
|
* |
12
|
|
|
* Unless required by applicable law or agreed to in writing, software |
13
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
14
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
15
|
|
|
* or implied. See the License for the specific language governing |
16
|
|
|
* permissions and limitations under the License. |
17
|
|
|
*/ |
18
|
|
|
|
19
|
|
|
declare(strict_types=1); |
20
|
|
|
|
21
|
|
|
namespace AmericanExpress\HyperledgerFabricClient\Peer; |
22
|
|
|
|
23
|
|
|
use AmericanExpress\HyperledgerFabricClient\Options\AbstractOptions; |
24
|
|
|
|
25
|
|
|
class PeerOptions extends AbstractOptions implements PeerOptionsInterface |
26
|
|
|
{ |
27
|
|
|
/** |
28
|
|
|
* @var string|null |
29
|
|
|
*/ |
30
|
|
|
private $name; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string|null |
34
|
|
|
*/ |
35
|
|
|
private $requests; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var string|null |
39
|
|
|
*/ |
40
|
|
|
private $events; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var string|null |
44
|
|
|
*/ |
45
|
|
|
private $serverHostname; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string|null |
49
|
|
|
*/ |
50
|
|
|
private $tlsCaCerts; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return string|null |
54
|
|
|
*/ |
55
|
2 |
|
public function getName(): ?string |
56
|
|
|
{ |
57
|
2 |
|
return $this->name; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param string $name |
62
|
|
|
* @return void |
63
|
|
|
*/ |
64
|
2 |
|
public function setName(string $name): void |
65
|
|
|
{ |
66
|
2 |
|
$this->name = $name; |
67
|
2 |
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return string|null |
71
|
|
|
*/ |
72
|
2 |
|
public function getRequests(): ?string |
73
|
|
|
{ |
74
|
2 |
|
return $this->requests; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @param string $requests |
79
|
|
|
*/ |
80
|
2 |
|
public function setRequests(string $requests): void |
81
|
|
|
{ |
82
|
2 |
|
$this->requests = $requests; |
83
|
2 |
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return string|null |
87
|
|
|
*/ |
88
|
2 |
|
public function getEvents(): ?string |
89
|
|
|
{ |
90
|
2 |
|
return $this->events; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @param string $events |
95
|
|
|
*/ |
96
|
2 |
|
public function setEvents(string $events): void |
97
|
|
|
{ |
98
|
2 |
|
$this->events = $events; |
99
|
2 |
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return string|null |
103
|
|
|
*/ |
104
|
2 |
|
public function getServerHostname(): ?string |
105
|
|
|
{ |
106
|
2 |
|
return $this->serverHostname; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @param string $serverHostname |
111
|
|
|
*/ |
112
|
2 |
|
public function setServerHostname(string $serverHostname): void |
113
|
|
|
{ |
114
|
2 |
|
$this->serverHostname = $serverHostname; |
115
|
2 |
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return string|null |
119
|
|
|
*/ |
120
|
2 |
|
public function getTlsCaCerts(): ?string |
121
|
|
|
{ |
122
|
2 |
|
return $this->tlsCaCerts; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @param string $tlsCaCerts |
127
|
|
|
*/ |
128
|
2 |
|
public function setTlsCaCerts(string $tlsCaCerts): void |
129
|
|
|
{ |
130
|
2 |
|
$this->tlsCaCerts = $tlsCaCerts; |
131
|
2 |
|
} |
132
|
|
|
} |
133
|
|
|
|