| 1 | <?php |
||
| 11 | final class SecureConnectionOptions |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var float |
||
| 15 | */ |
||
| 16 | private $timeout = 10; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | private $method; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * SecureConnectionOptions constructor. |
||
| 25 | * @param int $method |
||
| 26 | */ |
||
| 27 | public function __construct(int $method) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param float $connectionTimeout |
||
| 34 | * @return SecureConnectionOptions |
||
| 35 | */ |
||
| 36 | public function withTimeout(float $connectionTimeout): SecureConnectionOptions |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param int $method |
||
| 45 | * @return SecureConnectionOptions |
||
| 46 | */ |
||
| 47 | public function withMethod(int $method): SecureConnectionOptions |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return float |
||
| 56 | */ |
||
| 57 | public function getTimeout(): float |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return int |
||
| 64 | */ |
||
| 65 | public function getMethod(): int |
||
| 69 | } |