ZopRequest.php 788 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace App\library\zop;
  3. class ZopRequest
  4. {
  5. private $url;
  6. private $params = Array();
  7. private $body;
  8. public function addParam($k, $v)
  9. {
  10. $this->params += [$k => $v];
  11. }
  12. /**
  13. * @param mixed $url
  14. */
  15. public function setUrl($url)
  16. {
  17. $this->url = $url;
  18. }
  19. public function setData($data)
  20. {
  21. $this->params = json_decode($data);
  22. }
  23. public function setBody($body)
  24. {
  25. $this->body = $body;
  26. }
  27. public function getBody()
  28. {
  29. return $this->body;
  30. }
  31. /**
  32. * @return mixed
  33. */
  34. public function getUrl()
  35. {
  36. return $this->url;
  37. }
  38. /**
  39. * @return array
  40. */
  41. public function getParams()
  42. {
  43. return $this->params;
  44. }
  45. }