Result.php 517 B

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