Nessuna descrizione

Result.php 535B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * 服务器返回的结果.
  4. * @author wangkuiwei
  5. * @name Result
  6. * @desc Sender发送消息后,服务器返回的结果。
  7. *
  8. */
  9. namespace xmpush;
  10. class Result {
  11. private $errorCode;
  12. private $raw;
  13. public function __construct($jsonStr) {
  14. $data = json_decode($jsonStr, true);
  15. $this->raw = $data;
  16. $this->errorCode = $data['code'];
  17. }
  18. public function getErrorCode() {
  19. return $this->errorCode;
  20. }
  21. public function getRaw() {
  22. return $this->raw;
  23. }
  24. }
  25. ?>