protected function compareTokens(Token $token1 = null, Token $token2 = null) { if (!$token1 && !$token2) { return 0; } if (!$token1) { return 1; } if (!$token2) { return -1; } if ($token1->getIssueTime() < $token2->getIssueTime()) { return 1; } elseif ($token2->getIssueTime() < $token1->getIssueTime()) { return -1; } return 0; }
public function jsonSerialize() { $data = parent::jsonSerialize(); return array_merge($data, array('accessToken' => $this->getAccessToken(), 'tokenType' => $this->getTokenType(), 'expiresIn' => $this->getExpiresIn())); }
public function jsonSerialize() { $data = parent::jsonSerialize(); return array_merge($data, array('deviceCode' => $this->getDeviceCode(), 'expiryTime' => $this->getExpiryTime(), 'interval' => $this->getInterval(), 'userCode' => $this->getUserCode(), 'verificationUrl' => $this->getVerificationUrl(), 'lastPoll' => $this->getLastPoll())); }