暂无描述

Config.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace AliyunMNS;
  3. class Config
  4. {
  5. //private $maxAttempts;
  6. private $proxy; // http://username:password@192.168.16.1:10
  7. private $connectTimeout;
  8. private $requestTimeout;
  9. private $expectContinue;
  10. public function __construct()
  11. {
  12. // $this->maxAttempts = 3;
  13. $this->proxy = NULL;
  14. $this->requestTimeout = 35; // 35 seconds
  15. $this->connectTimeout = 3; // 3 seconds
  16. $this->expectContinue = false;
  17. }
  18. /*
  19. public function getMaxAttempts()
  20. {
  21. return $this->maxAttempts;
  22. }
  23. public function setMaxAttempts($maxAttempts)
  24. {
  25. $this->maxAttempts = $maxAttempts;
  26. }
  27. */
  28. public function getProxy()
  29. {
  30. return $this->proxy;
  31. }
  32. public function setProxy($proxy)
  33. {
  34. $this->proxy = $proxy;
  35. }
  36. public function getRequestTimeout()
  37. {
  38. return $this->requestTimeout;
  39. }
  40. public function setRequestTimeout($requestTimeout)
  41. {
  42. $this->requestTimeout = $requestTimeout;
  43. }
  44. public function setConnectTimeout($connectTimeout)
  45. {
  46. $this->connectTimeout = $connectTimeout;
  47. }
  48. public function getConnectTimeout()
  49. {
  50. return $this->connectTimeout;
  51. }
  52. public function getExpectContinue()
  53. {
  54. return $this->expectContinue;
  55. }
  56. public function setExpectContinue($expectContinue)
  57. {
  58. $this->expectContinue = $expectContinue;
  59. }
  60. }
  61. ?>