scopes = $scopes; $this->tokens = $tokens; } public function fetchAuthToken(callable $httpHandler = null) { $this->index = ($this->index + 1) % count($this->tokens); return $this->tokens[$this->index]; } public function getCacheKey() { return 'accessTokenCacheKey'; } public function getLastReceivedToken() { if ($this->index == -1) { return null; } else { return $this->tokens[$this->index]; } } }