No Description

AuthorizationToken.class.php 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. class AuthorizationToken {
  3. private $access_token;
  4. private $refresh_token;
  5. private $expires_in;
  6. private $expires_time;
  7. private $refresh_token_timeout;
  8. private $resource_owner;
  9. private $uid;
  10. private $aliId;
  11. private $memberId;
  12. public function setAccessToken($accessToken) {
  13. $this->access_token = $accessToken;
  14. }
  15. public function getAccessToken() {
  16. return $this->access_token;
  17. }
  18. private $stdResult;
  19. public function setStdResult($stdResult) {
  20. $this->stdResult = $stdResult;
  21. if (array_key_exists ( "access_token", $this->stdResult )) {
  22. $this->access_token = $this->stdResult->{"access_token"};
  23. }
  24. if (array_key_exists ( "refresh_token", $this->stdResult )) {
  25. $this->refresh_token = $this->stdResult->{"refresh_token"};
  26. }
  27. if (array_key_exists ( "expires_in", $this->stdResult )) {
  28. $this->expires_in = $this->stdResult->{"expires_in"};
  29. }
  30. if (array_key_exists ( "expires_time", $this->stdResult )) {
  31. $this->expires_time = $this->stdResult->{"expires_time"};
  32. }
  33. if (array_key_exists ( "refresh_token_timeout", $this->stdResult )) {
  34. $this->refresh_token_timeout = $this->stdResult->{"refresh_token_timeout"};
  35. }
  36. if (array_key_exists ( "resource_owner", $this->stdResult )) {
  37. $this->resource_owner = $this->stdResult->{"resource_owner"};
  38. }
  39. if (array_key_exists ( "uid", $this->stdResult )) {
  40. $this->uid = $this->stdResult->{"uid"};
  41. }
  42. if (array_key_exists ( "aliId", $this->stdResult )) {
  43. $this->aliId = $this->stdResult->{"aliId"};
  44. }
  45. if (array_key_exists ( "memberId", $this->stdResult )) {
  46. $this->memberId = $this->stdResult->{"memberId"};
  47. }
  48. }
  49. }
  50. ?>