| Total Complexity | 6 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | final class RequestOptions |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var int|null |
||
| 10 | * http 请求的超时时间,单位:秒,默认:0,不超时 |
||
| 11 | */ |
||
| 12 | public $connection_timeout; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var int|null |
||
| 16 | * http 请求的超时时间,单位:毫秒,默认:0,不超时 |
||
| 17 | */ |
||
| 18 | public $connection_timeout_ms; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int|null |
||
| 22 | * http 请求的超时时间,单位:秒,默认:0,不超时 |
||
| 23 | */ |
||
| 24 | public $timeout; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * @var int|null |
||
| 29 | * http 请求的超时时间,单位:毫秒,默认:0,不超时 |
||
| 30 | */ |
||
| 31 | public $timeout_ms; |
||
| 32 | |||
| 33 | public function __construct( |
||
| 34 | $connection_timeout = null, |
||
| 35 | $connection_timeout_ms = null, |
||
| 36 | $timeout = null, |
||
| 37 | $timeout_ms = null |
||
| 38 | ) { |
||
| 39 | $this->connection_timeout = $connection_timeout; |
||
| 40 | $this->connection_timeout_ms = $connection_timeout_ms; |
||
| 41 | $this->timeout = $timeout; |
||
| 42 | $this->timeout_ms = $timeout_ms; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getCurlOpt() |
||
| 61 | } |
||
| 62 | } |
||
| 63 |