crypter = $crypter; if ($stateBlob != null) { try { $state = $crypter->unwrap($stateBlob, self::$CALLBACK_STATE_MAX_AGE_SECS); } catch (BlobCrypterException $e) { // Probably too old, pretend we never saw it at all. } if ($state != null) { $this->state = $state; } } return; } /** * * @return string */ public function getEncryptedState() { return $this->crypter->wrap($this->state); } /** * * @return string */ public function getRealCallbackUrl() { if (isset($this->state[self::$REAL_CALLBACK_URL_KEY])) { return $this->state[self::$REAL_CALLBACK_URL_KEY]; } else { return false; } } /** * * @param string $callbackUrl */ public function setRealCallbackUrl($callbackUrl) { $this->state[self::$REAL_CALLBACK_URL_KEY] = $callbackUrl; } }