AbstractClient.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace Buzz\Client;
  3. abstract class AbstractClient implements ClientInterface
  4. {
  5. protected $ignoreErrors = true;
  6. protected $maxRedirects = 5;
  7. protected $timeout = 5;
  8. protected $verifyPeer = true;
  9. protected $verifyHost = 2;
  10. protected $proxy;
  11. public function setIgnoreErrors($ignoreErrors)
  12. {
  13. $this->ignoreErrors = $ignoreErrors;
  14. }
  15. public function getIgnoreErrors()
  16. {
  17. return $this->ignoreErrors;
  18. }
  19. public function setMaxRedirects($maxRedirects)
  20. {
  21. $this->maxRedirects = $maxRedirects;
  22. }
  23. public function getMaxRedirects()
  24. {
  25. return $this->maxRedirects;
  26. }
  27. public function setTimeout($timeout)
  28. {
  29. $this->timeout = $timeout;
  30. }
  31. public function getTimeout()
  32. {
  33. return $this->timeout;
  34. }
  35. public function setVerifyPeer($verifyPeer)
  36. {
  37. $this->verifyPeer = $verifyPeer;
  38. }
  39. public function getVerifyPeer()
  40. {
  41. return $this->verifyPeer;
  42. }
  43. public function getVerifyHost()
  44. {
  45. return $this->verifyHost;
  46. }
  47. public function setVerifyHost($verifyHost)
  48. {
  49. $this->verifyHost = $verifyHost;
  50. }
  51. public function setProxy($proxy)
  52. {
  53. $this->proxy = $proxy;
  54. }
  55. public function getProxy()
  56. {
  57. return $this->proxy;
  58. }
  59. }