Lines Matching refs:this

44         $this->redis = $redis;
45 $this->key = $key;
46 $this->stateKey = $stateKey;
47 $this->cachedTokens = array();
48 $this->cachedStates = array();
56 if (!$this->hasAccessToken($service)) {
60 if (isset($this->cachedTokens[$service])) {
61 return $this->cachedTokens[$service];
64 $val = $this->redis->hget($this->key, $service);
66 return $this->cachedTokens[$service] = unserialize($val);
75 $this->redis->hset($this->key, $service, serialize($token));
76 $this->cachedTokens[$service] = $token;
79 return $this;
87 if (isset($this->cachedTokens[$service])
88 && $this->cachedTokens[$service] instanceof TokenInterface
93 return $this->redis->hexists($this->key, $service);
101 $this->redis->hdel($this->key, $service);
102 unset($this->cachedTokens[$service]);
105 return $this;
114 $this->cachedTokens = array();
117 $keys = $this->redis->hkeys($this->key);
118 $me = $this; // 5.3 compat
121 $this->redis->pipeline(
130 return $this;
138 if (!$this->hasAuthorizationState($service)) {
142 if (isset($this->cachedStates[$service])) {
143 return $this->cachedStates[$service];
146 $val = $this->redis->hget($this->stateKey, $service);
148 return $this->cachedStates[$service] = unserialize($val);
157 $this->redis->hset($this->stateKey, $service, $state);
158 $this->cachedStates[$service] = $state;
161 return $this;
169 if (isset($this->cachedStates[$service])
170 && null !== $this->cachedStates[$service]
175 return $this->redis->hexists($this->stateKey, $service);
183 $this->redis->hdel($this->stateKey, $service);
184 unset($this->cachedStates[$service]);
187 return $this;
196 $this->cachedStates = array();
199 $keys = $this->redis->hkeys($this->stateKey);
200 $me = $this; // 5.3 compat
203 $this->redis->pipeline(
212 return $this;
220 return $this->redis;
228 return $this->key;