1 | <?php |
||
14 | class StreamSocketProvider implements ProviderInterface |
||
15 | { |
||
16 | |||
17 | const DEFAULT_TIMEOUT_SECONDS = 15; |
||
18 | const DEFAULT_PORT = 443; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $timeout; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $hostname; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $port; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * StreamSocketProvider constructor. |
||
38 | * |
||
39 | * @param string $hostname |
||
40 | * @param int $port (optional) |
||
41 | * @param int $timeout (optional) |
||
42 | */ |
||
43 | public function __construct($hostname, $port = self::DEFAULT_PORT, $timeout = self::DEFAULT_TIMEOUT_SECONDS) |
||
49 | |||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function getRawCertificate() |
||
97 | |||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | private function getRequestUrl() |
||
106 | |||
107 | } |
||
108 |