diff options
author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/symfony/cache/Traits | |
parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/symfony/cache/Traits')
-rw-r--r-- | vendor/symfony/cache/Traits/AbstractAdapterTrait.php | 377 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/ContractsTrait.php | 113 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/FilesystemCommonTrait.php | 191 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/FilesystemTrait.php | 113 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/ProxyTrait.php | 37 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/Redis5Proxy.php | 1228 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/Redis6Proxy.php | 1293 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisCluster5Proxy.php | 983 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisCluster6Proxy.php | 1143 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisClusterNodeProxy.php | 47 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisClusterProxy.php | 23 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisProxy.php | 23 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RedisTrait.php | 682 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RelayProxy.php | 1319 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/RelayProxyTrait.php | 156 | ||||
-rw-r--r-- | vendor/symfony/cache/Traits/ValueWrapper.php | 81 |
16 files changed, 7809 insertions, 0 deletions
diff --git a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/vendor/symfony/cache/Traits/AbstractAdapterTrait.php new file mode 100644 index 0000000..222bc54 --- /dev/null +++ b/vendor/symfony/cache/Traits/AbstractAdapterTrait.php | |||
@@ -0,0 +1,377 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Psr\Cache\CacheItemInterface; | ||
15 | use Psr\Log\LoggerAwareTrait; | ||
16 | use Symfony\Component\Cache\CacheItem; | ||
17 | use Symfony\Component\Cache\Exception\InvalidArgumentException; | ||
18 | |||
19 | /** | ||
20 | * @author Nicolas Grekas <p@tchwork.com> | ||
21 | * | ||
22 | * @internal | ||
23 | */ | ||
24 | trait AbstractAdapterTrait | ||
25 | { | ||
26 | use LoggerAwareTrait; | ||
27 | |||
28 | /** | ||
29 | * needs to be set by class, signature is function(string <key>, mixed <value>, bool <isHit>). | ||
30 | */ | ||
31 | private static \Closure $createCacheItem; | ||
32 | |||
33 | /** | ||
34 | * needs to be set by class, signature is function(array <deferred>, string <namespace>, array <&expiredIds>). | ||
35 | */ | ||
36 | private static \Closure $mergeByLifetime; | ||
37 | |||
38 | private string $namespace = ''; | ||
39 | private int $defaultLifetime; | ||
40 | private string $namespaceVersion = ''; | ||
41 | private bool $versioningIsEnabled = false; | ||
42 | private array $deferred = []; | ||
43 | private array $ids = []; | ||
44 | |||
45 | /** | ||
46 | * The maximum length to enforce for identifiers or null when no limit applies. | ||
47 | */ | ||
48 | protected ?int $maxIdLength = null; | ||
49 | |||
50 | /** | ||
51 | * Fetches several cache items. | ||
52 | * | ||
53 | * @param array $ids The cache identifiers to fetch | ||
54 | */ | ||
55 | abstract protected function doFetch(array $ids): iterable; | ||
56 | |||
57 | /** | ||
58 | * Confirms if the cache contains specified cache item. | ||
59 | * | ||
60 | * @param string $id The identifier for which to check existence | ||
61 | */ | ||
62 | abstract protected function doHave(string $id): bool; | ||
63 | |||
64 | /** | ||
65 | * Deletes all items in the pool. | ||
66 | * | ||
67 | * @param string $namespace The prefix used for all identifiers managed by this pool | ||
68 | */ | ||
69 | abstract protected function doClear(string $namespace): bool; | ||
70 | |||
71 | /** | ||
72 | * Removes multiple items from the pool. | ||
73 | * | ||
74 | * @param array $ids An array of identifiers that should be removed from the pool | ||
75 | */ | ||
76 | abstract protected function doDelete(array $ids): bool; | ||
77 | |||
78 | /** | ||
79 | * Persists several cache items immediately. | ||
80 | * | ||
81 | * @param array $values The values to cache, indexed by their cache identifier | ||
82 | * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning | ||
83 | * | ||
84 | * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not | ||
85 | */ | ||
86 | abstract protected function doSave(array $values, int $lifetime): array|bool; | ||
87 | |||
88 | public function hasItem(mixed $key): bool | ||
89 | { | ||
90 | $id = $this->getId($key); | ||
91 | |||
92 | if (isset($this->deferred[$key])) { | ||
93 | $this->commit(); | ||
94 | } | ||
95 | |||
96 | try { | ||
97 | return $this->doHave($id); | ||
98 | } catch (\Exception $e) { | ||
99 | CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached: '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
100 | |||
101 | return false; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | public function clear(string $prefix = ''): bool | ||
106 | { | ||
107 | $this->deferred = []; | ||
108 | if ($cleared = $this->versioningIsEnabled) { | ||
109 | if ('' === $namespaceVersionToClear = $this->namespaceVersion) { | ||
110 | foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { | ||
111 | $namespaceVersionToClear = $v; | ||
112 | } | ||
113 | } | ||
114 | $namespaceToClear = $this->namespace.$namespaceVersionToClear; | ||
115 | $namespaceVersion = self::formatNamespaceVersion(mt_rand()); | ||
116 | try { | ||
117 | $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0); | ||
118 | } catch (\Exception $e) { | ||
119 | } | ||
120 | if (true !== $e && [] !== $e) { | ||
121 | $cleared = false; | ||
122 | $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); | ||
123 | CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); | ||
124 | } else { | ||
125 | $this->namespaceVersion = $namespaceVersion; | ||
126 | $this->ids = []; | ||
127 | } | ||
128 | } else { | ||
129 | $namespaceToClear = $this->namespace.$prefix; | ||
130 | } | ||
131 | |||
132 | try { | ||
133 | return $this->doClear($namespaceToClear) || $cleared; | ||
134 | } catch (\Exception $e) { | ||
135 | CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
136 | |||
137 | return false; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | public function deleteItem(mixed $key): bool | ||
142 | { | ||
143 | return $this->deleteItems([$key]); | ||
144 | } | ||
145 | |||
146 | public function deleteItems(array $keys): bool | ||
147 | { | ||
148 | $ids = []; | ||
149 | |||
150 | foreach ($keys as $key) { | ||
151 | $ids[$key] = $this->getId($key); | ||
152 | unset($this->deferred[$key]); | ||
153 | } | ||
154 | |||
155 | try { | ||
156 | if ($this->doDelete($ids)) { | ||
157 | return true; | ||
158 | } | ||
159 | } catch (\Exception) { | ||
160 | } | ||
161 | |||
162 | $ok = true; | ||
163 | |||
164 | // When bulk-delete failed, retry each item individually | ||
165 | foreach ($ids as $key => $id) { | ||
166 | try { | ||
167 | $e = null; | ||
168 | if ($this->doDelete([$id])) { | ||
169 | continue; | ||
170 | } | ||
171 | } catch (\Exception $e) { | ||
172 | } | ||
173 | $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); | ||
174 | CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
175 | $ok = false; | ||
176 | } | ||
177 | |||
178 | return $ok; | ||
179 | } | ||
180 | |||
181 | public function getItem(mixed $key): CacheItem | ||
182 | { | ||
183 | $id = $this->getId($key); | ||
184 | |||
185 | if (isset($this->deferred[$key])) { | ||
186 | $this->commit(); | ||
187 | } | ||
188 | |||
189 | $isHit = false; | ||
190 | $value = null; | ||
191 | |||
192 | try { | ||
193 | foreach ($this->doFetch([$id]) as $value) { | ||
194 | $isHit = true; | ||
195 | } | ||
196 | |||
197 | return (self::$createCacheItem)($key, $value, $isHit); | ||
198 | } catch (\Exception $e) { | ||
199 | CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
200 | } | ||
201 | |||
202 | return (self::$createCacheItem)($key, null, false); | ||
203 | } | ||
204 | |||
205 | public function getItems(array $keys = []): iterable | ||
206 | { | ||
207 | $ids = []; | ||
208 | $commit = false; | ||
209 | |||
210 | foreach ($keys as $key) { | ||
211 | $ids[] = $this->getId($key); | ||
212 | $commit = $commit || isset($this->deferred[$key]); | ||
213 | } | ||
214 | |||
215 | if ($commit) { | ||
216 | $this->commit(); | ||
217 | } | ||
218 | |||
219 | try { | ||
220 | $items = $this->doFetch($ids); | ||
221 | } catch (\Exception $e) { | ||
222 | CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
223 | $items = []; | ||
224 | } | ||
225 | $ids = array_combine($ids, $keys); | ||
226 | |||
227 | return $this->generateItems($items, $ids); | ||
228 | } | ||
229 | |||
230 | public function save(CacheItemInterface $item): bool | ||
231 | { | ||
232 | if (!$item instanceof CacheItem) { | ||
233 | return false; | ||
234 | } | ||
235 | $this->deferred[$item->getKey()] = $item; | ||
236 | |||
237 | return $this->commit(); | ||
238 | } | ||
239 | |||
240 | public function saveDeferred(CacheItemInterface $item): bool | ||
241 | { | ||
242 | if (!$item instanceof CacheItem) { | ||
243 | return false; | ||
244 | } | ||
245 | $this->deferred[$item->getKey()] = $item; | ||
246 | |||
247 | return true; | ||
248 | } | ||
249 | |||
250 | /** | ||
251 | * Enables/disables versioning of items. | ||
252 | * | ||
253 | * When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed, | ||
254 | * but old keys may need garbage collection and extra round-trips to the back-end are required. | ||
255 | * | ||
256 | * Calling this method also clears the memoized namespace version and thus forces a resynchronization of it. | ||
257 | * | ||
258 | * @return bool the previous state of versioning | ||
259 | */ | ||
260 | public function enableVersioning(bool $enable = true): bool | ||
261 | { | ||
262 | $wasEnabled = $this->versioningIsEnabled; | ||
263 | $this->versioningIsEnabled = $enable; | ||
264 | $this->namespaceVersion = ''; | ||
265 | $this->ids = []; | ||
266 | |||
267 | return $wasEnabled; | ||
268 | } | ||
269 | |||
270 | public function reset(): void | ||
271 | { | ||
272 | if ($this->deferred) { | ||
273 | $this->commit(); | ||
274 | } | ||
275 | $this->namespaceVersion = ''; | ||
276 | $this->ids = []; | ||
277 | } | ||
278 | |||
279 | public function __sleep(): array | ||
280 | { | ||
281 | throw new \BadMethodCallException('Cannot serialize '.__CLASS__); | ||
282 | } | ||
283 | |||
284 | public function __wakeup(): void | ||
285 | { | ||
286 | throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); | ||
287 | } | ||
288 | |||
289 | public function __destruct() | ||
290 | { | ||
291 | if ($this->deferred) { | ||
292 | $this->commit(); | ||
293 | } | ||
294 | } | ||
295 | |||
296 | private function generateItems(iterable $items, array &$keys): \Generator | ||
297 | { | ||
298 | $f = self::$createCacheItem; | ||
299 | |||
300 | try { | ||
301 | foreach ($items as $id => $value) { | ||
302 | if (!isset($keys[$id])) { | ||
303 | throw new InvalidArgumentException(sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); | ||
304 | } | ||
305 | $key = $keys[$id]; | ||
306 | unset($keys[$id]); | ||
307 | yield $key => $f($key, $value, true); | ||
308 | } | ||
309 | } catch (\Exception $e) { | ||
310 | CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); | ||
311 | } | ||
312 | |||
313 | foreach ($keys as $key) { | ||
314 | yield $key => $f($key, null, false); | ||
315 | } | ||
316 | } | ||
317 | |||
318 | /** | ||
319 | * @internal | ||
320 | */ | ||
321 | protected function getId(mixed $key): string | ||
322 | { | ||
323 | if ($this->versioningIsEnabled && '' === $this->namespaceVersion) { | ||
324 | $this->ids = []; | ||
325 | $this->namespaceVersion = '1'.static::NS_SEPARATOR; | ||
326 | try { | ||
327 | foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { | ||
328 | $this->namespaceVersion = $v; | ||
329 | } | ||
330 | $e = true; | ||
331 | if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) { | ||
332 | $this->namespaceVersion = self::formatNamespaceVersion(time()); | ||
333 | $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $this->namespaceVersion], 0); | ||
334 | } | ||
335 | } catch (\Exception $e) { | ||
336 | } | ||
337 | if (true !== $e && [] !== $e) { | ||
338 | $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); | ||
339 | CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); | ||
340 | } | ||
341 | } | ||
342 | |||
343 | if (\is_string($key) && isset($this->ids[$key])) { | ||
344 | return $this->namespace.$this->namespaceVersion.$this->ids[$key]; | ||
345 | } | ||
346 | \assert('' !== CacheItem::validateKey($key)); | ||
347 | $this->ids[$key] = $key; | ||
348 | |||
349 | if (\count($this->ids) > 1000) { | ||
350 | $this->ids = \array_slice($this->ids, 500, null, true); // stop memory leak if there are many keys | ||
351 | } | ||
352 | |||
353 | if (null === $this->maxIdLength) { | ||
354 | return $this->namespace.$this->namespaceVersion.$key; | ||
355 | } | ||
356 | if (\strlen($id = $this->namespace.$this->namespaceVersion.$key) > $this->maxIdLength) { | ||
357 | // Use xxh128 to favor speed over security, which is not an issue here | ||
358 | $this->ids[$key] = $id = substr_replace(base64_encode(hash('xxh128', $key, true)), static::NS_SEPARATOR, -(\strlen($this->namespaceVersion) + 2)); | ||
359 | $id = $this->namespace.$this->namespaceVersion.$id; | ||
360 | } | ||
361 | |||
362 | return $id; | ||
363 | } | ||
364 | |||
365 | /** | ||
366 | * @internal | ||
367 | */ | ||
368 | public static function handleUnserializeCallback(string $class): never | ||
369 | { | ||
370 | throw new \DomainException('Class not found: '.$class); | ||
371 | } | ||
372 | |||
373 | private static function formatNamespaceVersion(int $value): string | ||
374 | { | ||
375 | return strtr(substr_replace(base64_encode(pack('V', $value)), static::NS_SEPARATOR, 5), '/', '_'); | ||
376 | } | ||
377 | } | ||
diff --git a/vendor/symfony/cache/Traits/ContractsTrait.php b/vendor/symfony/cache/Traits/ContractsTrait.php new file mode 100644 index 0000000..8d830f0 --- /dev/null +++ b/vendor/symfony/cache/Traits/ContractsTrait.php | |||
@@ -0,0 +1,113 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Psr\Log\LoggerInterface; | ||
15 | use Symfony\Component\Cache\Adapter\AdapterInterface; | ||
16 | use Symfony\Component\Cache\CacheItem; | ||
17 | use Symfony\Component\Cache\Exception\InvalidArgumentException; | ||
18 | use Symfony\Component\Cache\LockRegistry; | ||
19 | use Symfony\Contracts\Cache\CacheInterface; | ||
20 | use Symfony\Contracts\Cache\CacheTrait; | ||
21 | use Symfony\Contracts\Cache\ItemInterface; | ||
22 | |||
23 | /** | ||
24 | * @author Nicolas Grekas <p@tchwork.com> | ||
25 | * | ||
26 | * @internal | ||
27 | */ | ||
28 | trait ContractsTrait | ||
29 | { | ||
30 | use CacheTrait { | ||
31 | doGet as private contractsGet; | ||
32 | } | ||
33 | |||
34 | private \Closure $callbackWrapper; | ||
35 | private array $computing = []; | ||
36 | |||
37 | /** | ||
38 | * Wraps the callback passed to ->get() in a callable. | ||
39 | * | ||
40 | * @return callable the previous callback wrapper | ||
41 | */ | ||
42 | public function setCallbackWrapper(?callable $callbackWrapper): callable | ||
43 | { | ||
44 | if (!isset($this->callbackWrapper)) { | ||
45 | $this->callbackWrapper = LockRegistry::compute(...); | ||
46 | |||
47 | if (\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { | ||
48 | $this->setCallbackWrapper(null); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | if (null !== $callbackWrapper && !$callbackWrapper instanceof \Closure) { | ||
53 | $callbackWrapper = $callbackWrapper(...); | ||
54 | } | ||
55 | |||
56 | $previousWrapper = $this->callbackWrapper; | ||
57 | $this->callbackWrapper = $callbackWrapper ?? static fn (callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger) => $callback($item, $save); | ||
58 | |||
59 | return $previousWrapper; | ||
60 | } | ||
61 | |||
62 | private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null): mixed | ||
63 | { | ||
64 | if (0 > $beta ??= 1.0) { | ||
65 | throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); | ||
66 | } | ||
67 | |||
68 | static $setMetadata; | ||
69 | |||
70 | $setMetadata ??= \Closure::bind( | ||
71 | static function (CacheItem $item, float $startTime, ?array &$metadata) { | ||
72 | if ($item->expiry > $endTime = microtime(true)) { | ||
73 | $item->newMetadata[CacheItem::METADATA_EXPIRY] = $metadata[CacheItem::METADATA_EXPIRY] = $item->expiry; | ||
74 | $item->newMetadata[CacheItem::METADATA_CTIME] = $metadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); | ||
75 | } else { | ||
76 | unset($metadata[CacheItem::METADATA_EXPIRY], $metadata[CacheItem::METADATA_CTIME], $metadata[CacheItem::METADATA_TAGS]); | ||
77 | } | ||
78 | }, | ||
79 | null, | ||
80 | CacheItem::class | ||
81 | ); | ||
82 | |||
83 | $this->callbackWrapper ??= LockRegistry::compute(...); | ||
84 | |||
85 | return $this->contractsGet($pool, $key, function (CacheItem $item, bool &$save) use ($pool, $callback, $setMetadata, &$metadata, $key) { | ||
86 | // don't wrap nor save recursive calls | ||
87 | if (isset($this->computing[$key])) { | ||
88 | $value = $callback($item, $save); | ||
89 | $save = false; | ||
90 | |||
91 | return $value; | ||
92 | } | ||
93 | |||
94 | $this->computing[$key] = $key; | ||
95 | $startTime = microtime(true); | ||
96 | |||
97 | if (!isset($this->callbackWrapper)) { | ||
98 | $this->setCallbackWrapper($this->setCallbackWrapper(null)); | ||
99 | } | ||
100 | |||
101 | try { | ||
102 | $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (CacheItem $item) use ($setMetadata, $startTime, &$metadata) { | ||
103 | $setMetadata($item, $startTime, $metadata); | ||
104 | }, $this->logger ?? null); | ||
105 | $setMetadata($item, $startTime, $metadata); | ||
106 | |||
107 | return $value; | ||
108 | } finally { | ||
109 | unset($this->computing[$key]); | ||
110 | } | ||
111 | }, $beta, $metadata, $this->logger ?? null); | ||
112 | } | ||
113 | } | ||
diff --git a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/vendor/symfony/cache/Traits/FilesystemCommonTrait.php new file mode 100644 index 0000000..3e8c3b1 --- /dev/null +++ b/vendor/symfony/cache/Traits/FilesystemCommonTrait.php | |||
@@ -0,0 +1,191 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\Cache\Exception\InvalidArgumentException; | ||
15 | |||
16 | /** | ||
17 | * @author Nicolas Grekas <p@tchwork.com> | ||
18 | * | ||
19 | * @internal | ||
20 | */ | ||
21 | trait FilesystemCommonTrait | ||
22 | { | ||
23 | private string $directory; | ||
24 | private string $tmpSuffix; | ||
25 | |||
26 | private function init(string $namespace, ?string $directory): void | ||
27 | { | ||
28 | if (!isset($directory[0])) { | ||
29 | $directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfony-cache'; | ||
30 | } else { | ||
31 | $directory = realpath($directory) ?: $directory; | ||
32 | } | ||
33 | if (isset($namespace[0])) { | ||
34 | if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { | ||
35 | throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); | ||
36 | } | ||
37 | $directory .= \DIRECTORY_SEPARATOR.$namespace; | ||
38 | } else { | ||
39 | $directory .= \DIRECTORY_SEPARATOR.'@'; | ||
40 | } | ||
41 | if (!is_dir($directory)) { | ||
42 | @mkdir($directory, 0777, true); | ||
43 | } | ||
44 | $directory .= \DIRECTORY_SEPARATOR; | ||
45 | // On Windows the whole path is limited to 258 chars | ||
46 | if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) { | ||
47 | throw new InvalidArgumentException(sprintf('Cache directory too long (%s).', $directory)); | ||
48 | } | ||
49 | |||
50 | $this->directory = $directory; | ||
51 | } | ||
52 | |||
53 | protected function doClear(string $namespace): bool | ||
54 | { | ||
55 | $ok = true; | ||
56 | |||
57 | foreach ($this->scanHashDir($this->directory) as $file) { | ||
58 | if ('' !== $namespace && !str_starts_with($this->getFileKey($file), $namespace)) { | ||
59 | continue; | ||
60 | } | ||
61 | |||
62 | $ok = ($this->doUnlink($file) || !file_exists($file)) && $ok; | ||
63 | } | ||
64 | |||
65 | return $ok; | ||
66 | } | ||
67 | |||
68 | protected function doDelete(array $ids): bool | ||
69 | { | ||
70 | $ok = true; | ||
71 | |||
72 | foreach ($ids as $id) { | ||
73 | $file = $this->getFile($id); | ||
74 | $ok = (!is_file($file) || $this->doUnlink($file) || !file_exists($file)) && $ok; | ||
75 | } | ||
76 | |||
77 | return $ok; | ||
78 | } | ||
79 | |||
80 | protected function doUnlink(string $file): bool | ||
81 | { | ||
82 | return @unlink($file); | ||
83 | } | ||
84 | |||
85 | private function write(string $file, string $data, ?int $expiresAt = null): bool | ||
86 | { | ||
87 | $unlink = false; | ||
88 | set_error_handler(static fn ($type, $message, $file, $line) => throw new \ErrorException($message, 0, $type, $file, $line)); | ||
89 | try { | ||
90 | $tmp = $this->directory.$this->tmpSuffix ??= str_replace('/', '-', base64_encode(random_bytes(6))); | ||
91 | try { | ||
92 | $h = fopen($tmp, 'x'); | ||
93 | } catch (\ErrorException $e) { | ||
94 | if (!str_contains($e->getMessage(), 'File exists')) { | ||
95 | throw $e; | ||
96 | } | ||
97 | |||
98 | $tmp = $this->directory.$this->tmpSuffix = str_replace('/', '-', base64_encode(random_bytes(6))); | ||
99 | $h = fopen($tmp, 'x'); | ||
100 | } | ||
101 | fwrite($h, $data); | ||
102 | fclose($h); | ||
103 | $unlink = true; | ||
104 | |||
105 | if (null !== $expiresAt) { | ||
106 | touch($tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds | ||
107 | } | ||
108 | |||
109 | if ('\\' === \DIRECTORY_SEPARATOR) { | ||
110 | $success = copy($tmp, $file); | ||
111 | $unlink = true; | ||
112 | } else { | ||
113 | $success = rename($tmp, $file); | ||
114 | $unlink = !$success; | ||
115 | } | ||
116 | |||
117 | return $success; | ||
118 | } finally { | ||
119 | restore_error_handler(); | ||
120 | |||
121 | if ($unlink) { | ||
122 | @unlink($tmp); | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | |||
127 | private function getFile(string $id, bool $mkdir = false, ?string $directory = null): string | ||
128 | { | ||
129 | // Use xxh128 to favor speed over security, which is not an issue here | ||
130 | $hash = str_replace('/', '-', base64_encode(hash('xxh128', static::class.$id, true))); | ||
131 | $dir = ($directory ?? $this->directory).strtoupper($hash[0].\DIRECTORY_SEPARATOR.$hash[1].\DIRECTORY_SEPARATOR); | ||
132 | |||
133 | if ($mkdir && !is_dir($dir)) { | ||
134 | @mkdir($dir, 0777, true); | ||
135 | } | ||
136 | |||
137 | return $dir.substr($hash, 2, 20); | ||
138 | } | ||
139 | |||
140 | private function getFileKey(string $file): string | ||
141 | { | ||
142 | return ''; | ||
143 | } | ||
144 | |||
145 | private function scanHashDir(string $directory): \Generator | ||
146 | { | ||
147 | if (!is_dir($directory)) { | ||
148 | return; | ||
149 | } | ||
150 | |||
151 | $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; | ||
152 | |||
153 | for ($i = 0; $i < 38; ++$i) { | ||
154 | if (!is_dir($directory.$chars[$i])) { | ||
155 | continue; | ||
156 | } | ||
157 | |||
158 | for ($j = 0; $j < 38; ++$j) { | ||
159 | if (!is_dir($dir = $directory.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { | ||
160 | continue; | ||
161 | } | ||
162 | |||
163 | foreach (@scandir($dir, \SCANDIR_SORT_NONE) ?: [] as $file) { | ||
164 | if ('.' !== $file && '..' !== $file) { | ||
165 | yield $dir.\DIRECTORY_SEPARATOR.$file; | ||
166 | } | ||
167 | } | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | public function __sleep(): array | ||
173 | { | ||
174 | throw new \BadMethodCallException('Cannot serialize '.__CLASS__); | ||
175 | } | ||
176 | |||
177 | public function __wakeup(): void | ||
178 | { | ||
179 | throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); | ||
180 | } | ||
181 | |||
182 | public function __destruct() | ||
183 | { | ||
184 | if (method_exists(parent::class, '__destruct')) { | ||
185 | parent::__destruct(); | ||
186 | } | ||
187 | if (isset($this->tmpSuffix) && is_file($this->directory.$this->tmpSuffix)) { | ||
188 | unlink($this->directory.$this->tmpSuffix); | ||
189 | } | ||
190 | } | ||
191 | } | ||
diff --git a/vendor/symfony/cache/Traits/FilesystemTrait.php b/vendor/symfony/cache/Traits/FilesystemTrait.php new file mode 100644 index 0000000..47e9b83 --- /dev/null +++ b/vendor/symfony/cache/Traits/FilesystemTrait.php | |||
@@ -0,0 +1,113 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\Cache\Exception\CacheException; | ||
15 | use Symfony\Component\Cache\Marshaller\MarshallerInterface; | ||
16 | |||
17 | /** | ||
18 | * @author Nicolas Grekas <p@tchwork.com> | ||
19 | * @author Rob Frawley 2nd <rmf@src.run> | ||
20 | * | ||
21 | * @internal | ||
22 | */ | ||
23 | trait FilesystemTrait | ||
24 | { | ||
25 | use FilesystemCommonTrait; | ||
26 | |||
27 | private MarshallerInterface $marshaller; | ||
28 | |||
29 | public function prune(): bool | ||
30 | { | ||
31 | $time = time(); | ||
32 | $pruned = true; | ||
33 | |||
34 | foreach ($this->scanHashDir($this->directory) as $file) { | ||
35 | if (!$h = @fopen($file, 'r')) { | ||
36 | continue; | ||
37 | } | ||
38 | |||
39 | if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) { | ||
40 | fclose($h); | ||
41 | $pruned = (@unlink($file) || !file_exists($file)) && $pruned; | ||
42 | } else { | ||
43 | fclose($h); | ||
44 | } | ||
45 | } | ||
46 | |||
47 | return $pruned; | ||
48 | } | ||
49 | |||
50 | protected function doFetch(array $ids): iterable | ||
51 | { | ||
52 | $values = []; | ||
53 | $now = time(); | ||
54 | |||
55 | foreach ($ids as $id) { | ||
56 | $file = $this->getFile($id); | ||
57 | if (!is_file($file) || !$h = @fopen($file, 'r')) { | ||
58 | continue; | ||
59 | } | ||
60 | if (($expiresAt = (int) fgets($h)) && $now >= $expiresAt) { | ||
61 | fclose($h); | ||
62 | @unlink($file); | ||
63 | } else { | ||
64 | $i = rawurldecode(rtrim(fgets($h))); | ||
65 | $value = stream_get_contents($h); | ||
66 | fclose($h); | ||
67 | if ($i === $id) { | ||
68 | $values[$id] = $this->marshaller->unmarshall($value); | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 | |||
73 | return $values; | ||
74 | } | ||
75 | |||
76 | protected function doHave(string $id): bool | ||
77 | { | ||
78 | $file = $this->getFile($id); | ||
79 | |||
80 | return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id])); | ||
81 | } | ||
82 | |||
83 | protected function doSave(array $values, int $lifetime): array|bool | ||
84 | { | ||
85 | $expiresAt = $lifetime ? (time() + $lifetime) : 0; | ||
86 | $values = $this->marshaller->marshall($values, $failed); | ||
87 | |||
88 | foreach ($values as $id => $value) { | ||
89 | if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) { | ||
90 | $failed[] = $id; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | if ($failed && !is_writable($this->directory)) { | ||
95 | throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); | ||
96 | } | ||
97 | |||
98 | return $failed; | ||
99 | } | ||
100 | |||
101 | private function getFileKey(string $file): string | ||
102 | { | ||
103 | if (!$h = @fopen($file, 'r')) { | ||
104 | return ''; | ||
105 | } | ||
106 | |||
107 | fgets($h); // expiry | ||
108 | $encodedKey = fgets($h); | ||
109 | fclose($h); | ||
110 | |||
111 | return rawurldecode(rtrim($encodedKey)); | ||
112 | } | ||
113 | } | ||
diff --git a/vendor/symfony/cache/Traits/ProxyTrait.php b/vendor/symfony/cache/Traits/ProxyTrait.php new file mode 100644 index 0000000..ba7c11f --- /dev/null +++ b/vendor/symfony/cache/Traits/ProxyTrait.php | |||
@@ -0,0 +1,37 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\Cache\PruneableInterface; | ||
15 | use Symfony\Contracts\Service\ResetInterface; | ||
16 | |||
17 | /** | ||
18 | * @author Nicolas Grekas <p@tchwork.com> | ||
19 | * | ||
20 | * @internal | ||
21 | */ | ||
22 | trait ProxyTrait | ||
23 | { | ||
24 | private object $pool; | ||
25 | |||
26 | public function prune(): bool | ||
27 | { | ||
28 | return $this->pool instanceof PruneableInterface && $this->pool->prune(); | ||
29 | } | ||
30 | |||
31 | public function reset(): void | ||
32 | { | ||
33 | if ($this->pool instanceof ResetInterface) { | ||
34 | $this->pool->reset(); | ||
35 | } | ||
36 | } | ||
37 | } | ||
diff --git a/vendor/symfony/cache/Traits/Redis5Proxy.php b/vendor/symfony/cache/Traits/Redis5Proxy.php new file mode 100644 index 0000000..0b2794e --- /dev/null +++ b/vendor/symfony/cache/Traits/Redis5Proxy.php | |||
@@ -0,0 +1,1228 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\VarExporter\LazyObjectInterface; | ||
15 | use Symfony\Component\VarExporter\LazyProxyTrait; | ||
16 | use Symfony\Contracts\Service\ResetInterface; | ||
17 | |||
18 | // Help opcache.preload discover always-needed symbols | ||
19 | class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); | ||
20 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); | ||
21 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); | ||
22 | |||
23 | /** | ||
24 | * @internal | ||
25 | */ | ||
26 | class Redis5Proxy extends \Redis implements ResetInterface, LazyObjectInterface | ||
27 | { | ||
28 | use LazyProxyTrait { | ||
29 | resetLazyObject as reset; | ||
30 | } | ||
31 | |||
32 | private const LAZY_OBJECT_PROPERTY_SCOPES = []; | ||
33 | |||
34 | public function __construct() | ||
35 | { | ||
36 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); | ||
37 | } | ||
38 | |||
39 | public function _prefix($key) | ||
40 | { | ||
41 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); | ||
42 | } | ||
43 | |||
44 | public function _serialize($value) | ||
45 | { | ||
46 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); | ||
47 | } | ||
48 | |||
49 | public function _unserialize($value) | ||
50 | { | ||
51 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); | ||
52 | } | ||
53 | |||
54 | public function _pack($value) | ||
55 | { | ||
56 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); | ||
57 | } | ||
58 | |||
59 | public function _unpack($value) | ||
60 | { | ||
61 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); | ||
62 | } | ||
63 | |||
64 | public function _compress($value) | ||
65 | { | ||
66 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); | ||
67 | } | ||
68 | |||
69 | public function _uncompress($value) | ||
70 | { | ||
71 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); | ||
72 | } | ||
73 | |||
74 | public function acl($subcmd, ...$args) | ||
75 | { | ||
76 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); | ||
77 | } | ||
78 | |||
79 | public function append($key, $value) | ||
80 | { | ||
81 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); | ||
82 | } | ||
83 | |||
84 | public function auth(#[\SensitiveParameter] $auth) | ||
85 | { | ||
86 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); | ||
87 | } | ||
88 | |||
89 | public function bgSave() | ||
90 | { | ||
91 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgSave(...\func_get_args()); | ||
92 | } | ||
93 | |||
94 | public function bgrewriteaof() | ||
95 | { | ||
96 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); | ||
97 | } | ||
98 | |||
99 | public function bitcount($key) | ||
100 | { | ||
101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); | ||
102 | } | ||
103 | |||
104 | public function bitop($operation, $ret_key, $key, ...$other_keys) | ||
105 | { | ||
106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); | ||
107 | } | ||
108 | |||
109 | public function bitpos($key, $bit, $start = null, $end = null) | ||
110 | { | ||
111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); | ||
112 | } | ||
113 | |||
114 | public function blPop($key, $timeout_or_key, ...$extra_args) | ||
115 | { | ||
116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blPop(...\func_get_args()); | ||
117 | } | ||
118 | |||
119 | public function brPop($key, $timeout_or_key, ...$extra_args) | ||
120 | { | ||
121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brPop(...\func_get_args()); | ||
122 | } | ||
123 | |||
124 | public function brpoplpush($src, $dst, $timeout) | ||
125 | { | ||
126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); | ||
127 | } | ||
128 | |||
129 | public function bzPopMax($key, $timeout_or_key, ...$extra_args) | ||
130 | { | ||
131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMax(...\func_get_args()); | ||
132 | } | ||
133 | |||
134 | public function bzPopMin($key, $timeout_or_key, ...$extra_args) | ||
135 | { | ||
136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMin(...\func_get_args()); | ||
137 | } | ||
138 | |||
139 | public function clearLastError() | ||
140 | { | ||
141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); | ||
142 | } | ||
143 | |||
144 | public function client($cmd, ...$args) | ||
145 | { | ||
146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); | ||
147 | } | ||
148 | |||
149 | public function close() | ||
150 | { | ||
151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); | ||
152 | } | ||
153 | |||
154 | public function command(...$args) | ||
155 | { | ||
156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); | ||
157 | } | ||
158 | |||
159 | public function config($cmd, $key, $value = null) | ||
160 | { | ||
161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); | ||
162 | } | ||
163 | |||
164 | public function connect($host, $port = null, $timeout = null, $retry_interval = null) | ||
165 | { | ||
166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); | ||
167 | } | ||
168 | |||
169 | public function dbSize() | ||
170 | { | ||
171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbSize(...\func_get_args()); | ||
172 | } | ||
173 | |||
174 | public function debug($key) | ||
175 | { | ||
176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->debug(...\func_get_args()); | ||
177 | } | ||
178 | |||
179 | public function decr($key) | ||
180 | { | ||
181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); | ||
182 | } | ||
183 | |||
184 | public function decrBy($key, $value) | ||
185 | { | ||
186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrBy(...\func_get_args()); | ||
187 | } | ||
188 | |||
189 | public function del($key, ...$other_keys) | ||
190 | { | ||
191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); | ||
192 | } | ||
193 | |||
194 | public function discard() | ||
195 | { | ||
196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); | ||
197 | } | ||
198 | |||
199 | public function dump($key) | ||
200 | { | ||
201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); | ||
202 | } | ||
203 | |||
204 | public function echo($msg) | ||
205 | { | ||
206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); | ||
207 | } | ||
208 | |||
209 | public function eval($script, $args = null, $num_keys = null) | ||
210 | { | ||
211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); | ||
212 | } | ||
213 | |||
214 | public function evalsha($script_sha, $args = null, $num_keys = null) | ||
215 | { | ||
216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); | ||
217 | } | ||
218 | |||
219 | public function exec() | ||
220 | { | ||
221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); | ||
222 | } | ||
223 | |||
224 | public function exists($key, ...$other_keys) | ||
225 | { | ||
226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); | ||
227 | } | ||
228 | |||
229 | public function expire($key, $timeout) | ||
230 | { | ||
231 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); | ||
232 | } | ||
233 | |||
234 | public function expireAt($key, $timestamp) | ||
235 | { | ||
236 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireAt(...\func_get_args()); | ||
237 | } | ||
238 | |||
239 | public function flushAll($async = null) | ||
240 | { | ||
241 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushAll(...\func_get_args()); | ||
242 | } | ||
243 | |||
244 | public function flushDB($async = null) | ||
245 | { | ||
246 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushDB(...\func_get_args()); | ||
247 | } | ||
248 | |||
249 | public function geoadd($key, $lng, $lat, $member, ...$other_triples) | ||
250 | { | ||
251 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); | ||
252 | } | ||
253 | |||
254 | public function geodist($key, $src, $dst, $unit = null) | ||
255 | { | ||
256 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); | ||
257 | } | ||
258 | |||
259 | public function geohash($key, $member, ...$other_members) | ||
260 | { | ||
261 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); | ||
262 | } | ||
263 | |||
264 | public function geopos($key, $member, ...$other_members) | ||
265 | { | ||
266 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); | ||
267 | } | ||
268 | |||
269 | public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) | ||
270 | { | ||
271 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); | ||
272 | } | ||
273 | |||
274 | public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) | ||
275 | { | ||
276 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); | ||
277 | } | ||
278 | |||
279 | public function georadiusbymember($key, $member, $radius, $unit, $opts = null) | ||
280 | { | ||
281 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); | ||
282 | } | ||
283 | |||
284 | public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) | ||
285 | { | ||
286 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); | ||
287 | } | ||
288 | |||
289 | public function get($key) | ||
290 | { | ||
291 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); | ||
292 | } | ||
293 | |||
294 | public function getAuth() | ||
295 | { | ||
296 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); | ||
297 | } | ||
298 | |||
299 | public function getBit($key, $offset) | ||
300 | { | ||
301 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBit(...\func_get_args()); | ||
302 | } | ||
303 | |||
304 | public function getDBNum() | ||
305 | { | ||
306 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDBNum(...\func_get_args()); | ||
307 | } | ||
308 | |||
309 | public function getHost() | ||
310 | { | ||
311 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); | ||
312 | } | ||
313 | |||
314 | public function getLastError() | ||
315 | { | ||
316 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); | ||
317 | } | ||
318 | |||
319 | public function getMode() | ||
320 | { | ||
321 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); | ||
322 | } | ||
323 | |||
324 | public function getOption($option) | ||
325 | { | ||
326 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); | ||
327 | } | ||
328 | |||
329 | public function getPersistentID() | ||
330 | { | ||
331 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); | ||
332 | } | ||
333 | |||
334 | public function getPort() | ||
335 | { | ||
336 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); | ||
337 | } | ||
338 | |||
339 | public function getRange($key, $start, $end) | ||
340 | { | ||
341 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getRange(...\func_get_args()); | ||
342 | } | ||
343 | |||
344 | public function getReadTimeout() | ||
345 | { | ||
346 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); | ||
347 | } | ||
348 | |||
349 | public function getSet($key, $value) | ||
350 | { | ||
351 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getSet(...\func_get_args()); | ||
352 | } | ||
353 | |||
354 | public function getTimeout() | ||
355 | { | ||
356 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); | ||
357 | } | ||
358 | |||
359 | public function hDel($key, $member, ...$other_members) | ||
360 | { | ||
361 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hDel(...\func_get_args()); | ||
362 | } | ||
363 | |||
364 | public function hExists($key, $member) | ||
365 | { | ||
366 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hExists(...\func_get_args()); | ||
367 | } | ||
368 | |||
369 | public function hGet($key, $member) | ||
370 | { | ||
371 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGet(...\func_get_args()); | ||
372 | } | ||
373 | |||
374 | public function hGetAll($key) | ||
375 | { | ||
376 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGetAll(...\func_get_args()); | ||
377 | } | ||
378 | |||
379 | public function hIncrBy($key, $member, $value) | ||
380 | { | ||
381 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrBy(...\func_get_args()); | ||
382 | } | ||
383 | |||
384 | public function hIncrByFloat($key, $member, $value) | ||
385 | { | ||
386 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrByFloat(...\func_get_args()); | ||
387 | } | ||
388 | |||
389 | public function hKeys($key) | ||
390 | { | ||
391 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hKeys(...\func_get_args()); | ||
392 | } | ||
393 | |||
394 | public function hLen($key) | ||
395 | { | ||
396 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hLen(...\func_get_args()); | ||
397 | } | ||
398 | |||
399 | public function hMget($key, $keys) | ||
400 | { | ||
401 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMget(...\func_get_args()); | ||
402 | } | ||
403 | |||
404 | public function hMset($key, $pairs) | ||
405 | { | ||
406 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMset(...\func_get_args()); | ||
407 | } | ||
408 | |||
409 | public function hSet($key, $member, $value) | ||
410 | { | ||
411 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); | ||
412 | } | ||
413 | |||
414 | public function hSetNx($key, $member, $value) | ||
415 | { | ||
416 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSetNx(...\func_get_args()); | ||
417 | } | ||
418 | |||
419 | public function hStrLen($key, $member) | ||
420 | { | ||
421 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hStrLen(...\func_get_args()); | ||
422 | } | ||
423 | |||
424 | public function hVals($key) | ||
425 | { | ||
426 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hVals(...\func_get_args()); | ||
427 | } | ||
428 | |||
429 | public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
430 | { | ||
431 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
432 | } | ||
433 | |||
434 | public function incr($key) | ||
435 | { | ||
436 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); | ||
437 | } | ||
438 | |||
439 | public function incrBy($key, $value) | ||
440 | { | ||
441 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrBy(...\func_get_args()); | ||
442 | } | ||
443 | |||
444 | public function incrByFloat($key, $value) | ||
445 | { | ||
446 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrByFloat(...\func_get_args()); | ||
447 | } | ||
448 | |||
449 | public function info($option = null) | ||
450 | { | ||
451 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); | ||
452 | } | ||
453 | |||
454 | public function isConnected() | ||
455 | { | ||
456 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); | ||
457 | } | ||
458 | |||
459 | public function keys($pattern) | ||
460 | { | ||
461 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); | ||
462 | } | ||
463 | |||
464 | public function lInsert($key, $position, $pivot, $value) | ||
465 | { | ||
466 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lInsert(...\func_get_args()); | ||
467 | } | ||
468 | |||
469 | public function lLen($key) | ||
470 | { | ||
471 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lLen(...\func_get_args()); | ||
472 | } | ||
473 | |||
474 | public function lPop($key) | ||
475 | { | ||
476 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPop(...\func_get_args()); | ||
477 | } | ||
478 | |||
479 | public function lPush($key, $value) | ||
480 | { | ||
481 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPush(...\func_get_args()); | ||
482 | } | ||
483 | |||
484 | public function lPushx($key, $value) | ||
485 | { | ||
486 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPushx(...\func_get_args()); | ||
487 | } | ||
488 | |||
489 | public function lSet($key, $index, $value) | ||
490 | { | ||
491 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSet(...\func_get_args()); | ||
492 | } | ||
493 | |||
494 | public function lastSave() | ||
495 | { | ||
496 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastSave(...\func_get_args()); | ||
497 | } | ||
498 | |||
499 | public function lindex($key, $index) | ||
500 | { | ||
501 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); | ||
502 | } | ||
503 | |||
504 | public function lrange($key, $start, $end) | ||
505 | { | ||
506 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); | ||
507 | } | ||
508 | |||
509 | public function lrem($key, $value, $count) | ||
510 | { | ||
511 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); | ||
512 | } | ||
513 | |||
514 | public function ltrim($key, $start, $stop) | ||
515 | { | ||
516 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); | ||
517 | } | ||
518 | |||
519 | public function mget($keys) | ||
520 | { | ||
521 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); | ||
522 | } | ||
523 | |||
524 | public function migrate($host, $port, $key, $db, $timeout, $copy = null, $replace = null) | ||
525 | { | ||
526 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); | ||
527 | } | ||
528 | |||
529 | public function move($key, $dbindex) | ||
530 | { | ||
531 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); | ||
532 | } | ||
533 | |||
534 | public function mset($pairs) | ||
535 | { | ||
536 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); | ||
537 | } | ||
538 | |||
539 | public function msetnx($pairs) | ||
540 | { | ||
541 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); | ||
542 | } | ||
543 | |||
544 | public function multi($mode = null) | ||
545 | { | ||
546 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); | ||
547 | } | ||
548 | |||
549 | public function object($field, $key) | ||
550 | { | ||
551 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); | ||
552 | } | ||
553 | |||
554 | public function pconnect($host, $port = null, $timeout = null) | ||
555 | { | ||
556 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); | ||
557 | } | ||
558 | |||
559 | public function persist($key) | ||
560 | { | ||
561 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); | ||
562 | } | ||
563 | |||
564 | public function pexpire($key, $timestamp) | ||
565 | { | ||
566 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); | ||
567 | } | ||
568 | |||
569 | public function pexpireAt($key, $timestamp) | ||
570 | { | ||
571 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireAt(...\func_get_args()); | ||
572 | } | ||
573 | |||
574 | public function pfadd($key, $elements) | ||
575 | { | ||
576 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); | ||
577 | } | ||
578 | |||
579 | public function pfcount($key) | ||
580 | { | ||
581 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); | ||
582 | } | ||
583 | |||
584 | public function pfmerge($dstkey, $keys) | ||
585 | { | ||
586 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); | ||
587 | } | ||
588 | |||
589 | public function ping() | ||
590 | { | ||
591 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); | ||
592 | } | ||
593 | |||
594 | public function pipeline() | ||
595 | { | ||
596 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); | ||
597 | } | ||
598 | |||
599 | public function psetex($key, $expire, $value) | ||
600 | { | ||
601 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); | ||
602 | } | ||
603 | |||
604 | public function psubscribe($patterns, $callback) | ||
605 | { | ||
606 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); | ||
607 | } | ||
608 | |||
609 | public function pttl($key) | ||
610 | { | ||
611 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); | ||
612 | } | ||
613 | |||
614 | public function publish($channel, $message) | ||
615 | { | ||
616 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); | ||
617 | } | ||
618 | |||
619 | public function pubsub($cmd, ...$args) | ||
620 | { | ||
621 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); | ||
622 | } | ||
623 | |||
624 | public function punsubscribe($pattern, ...$other_patterns) | ||
625 | { | ||
626 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); | ||
627 | } | ||
628 | |||
629 | public function rPop($key) | ||
630 | { | ||
631 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPop(...\func_get_args()); | ||
632 | } | ||
633 | |||
634 | public function rPush($key, $value) | ||
635 | { | ||
636 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPush(...\func_get_args()); | ||
637 | } | ||
638 | |||
639 | public function rPushx($key, $value) | ||
640 | { | ||
641 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPushx(...\func_get_args()); | ||
642 | } | ||
643 | |||
644 | public function randomKey() | ||
645 | { | ||
646 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomKey(...\func_get_args()); | ||
647 | } | ||
648 | |||
649 | public function rawcommand($cmd, ...$args) | ||
650 | { | ||
651 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); | ||
652 | } | ||
653 | |||
654 | public function rename($key, $newkey) | ||
655 | { | ||
656 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); | ||
657 | } | ||
658 | |||
659 | public function renameNx($key, $newkey) | ||
660 | { | ||
661 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameNx(...\func_get_args()); | ||
662 | } | ||
663 | |||
664 | public function restore($ttl, $key, $value) | ||
665 | { | ||
666 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); | ||
667 | } | ||
668 | |||
669 | public function role() | ||
670 | { | ||
671 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); | ||
672 | } | ||
673 | |||
674 | public function rpoplpush($src, $dst) | ||
675 | { | ||
676 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); | ||
677 | } | ||
678 | |||
679 | public function sAdd($key, $value) | ||
680 | { | ||
681 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAdd(...\func_get_args()); | ||
682 | } | ||
683 | |||
684 | public function sAddArray($key, $options) | ||
685 | { | ||
686 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAddArray(...\func_get_args()); | ||
687 | } | ||
688 | |||
689 | public function sDiff($key, ...$other_keys) | ||
690 | { | ||
691 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiff(...\func_get_args()); | ||
692 | } | ||
693 | |||
694 | public function sDiffStore($dst, $key, ...$other_keys) | ||
695 | { | ||
696 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiffStore(...\func_get_args()); | ||
697 | } | ||
698 | |||
699 | public function sInter($key, ...$other_keys) | ||
700 | { | ||
701 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInter(...\func_get_args()); | ||
702 | } | ||
703 | |||
704 | public function sInterStore($dst, $key, ...$other_keys) | ||
705 | { | ||
706 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInterStore(...\func_get_args()); | ||
707 | } | ||
708 | |||
709 | public function sMembers($key) | ||
710 | { | ||
711 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMembers(...\func_get_args()); | ||
712 | } | ||
713 | |||
714 | public function sMisMember($key, $member, ...$other_members) | ||
715 | { | ||
716 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMisMember(...\func_get_args()); | ||
717 | } | ||
718 | |||
719 | public function sMove($src, $dst, $value) | ||
720 | { | ||
721 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMove(...\func_get_args()); | ||
722 | } | ||
723 | |||
724 | public function sPop($key) | ||
725 | { | ||
726 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sPop(...\func_get_args()); | ||
727 | } | ||
728 | |||
729 | public function sRandMember($key, $count = null) | ||
730 | { | ||
731 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRandMember(...\func_get_args()); | ||
732 | } | ||
733 | |||
734 | public function sUnion($key, ...$other_keys) | ||
735 | { | ||
736 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnion(...\func_get_args()); | ||
737 | } | ||
738 | |||
739 | public function sUnionStore($dst, $key, ...$other_keys) | ||
740 | { | ||
741 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnionStore(...\func_get_args()); | ||
742 | } | ||
743 | |||
744 | public function save() | ||
745 | { | ||
746 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); | ||
747 | } | ||
748 | |||
749 | public function scan(&$i_iterator, $str_pattern = null, $i_count = null) | ||
750 | { | ||
751 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); | ||
752 | } | ||
753 | |||
754 | public function scard($key) | ||
755 | { | ||
756 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); | ||
757 | } | ||
758 | |||
759 | public function script($cmd, ...$args) | ||
760 | { | ||
761 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); | ||
762 | } | ||
763 | |||
764 | public function select($dbindex) | ||
765 | { | ||
766 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); | ||
767 | } | ||
768 | |||
769 | public function set($key, $value, $opts = null) | ||
770 | { | ||
771 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); | ||
772 | } | ||
773 | |||
774 | public function setBit($key, $offset, $value) | ||
775 | { | ||
776 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setBit(...\func_get_args()); | ||
777 | } | ||
778 | |||
779 | public function setOption($option, $value) | ||
780 | { | ||
781 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); | ||
782 | } | ||
783 | |||
784 | public function setRange($key, $offset, $value) | ||
785 | { | ||
786 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setRange(...\func_get_args()); | ||
787 | } | ||
788 | |||
789 | public function setex($key, $expire, $value) | ||
790 | { | ||
791 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); | ||
792 | } | ||
793 | |||
794 | public function setnx($key, $value) | ||
795 | { | ||
796 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); | ||
797 | } | ||
798 | |||
799 | public function sismember($key, $value) | ||
800 | { | ||
801 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); | ||
802 | } | ||
803 | |||
804 | public function slaveof($host = null, $port = null) | ||
805 | { | ||
806 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slaveof(...\func_get_args()); | ||
807 | } | ||
808 | |||
809 | public function slowlog($arg, $option = null) | ||
810 | { | ||
811 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); | ||
812 | } | ||
813 | |||
814 | public function sort($key, $options = null) | ||
815 | { | ||
816 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); | ||
817 | } | ||
818 | |||
819 | public function sortAsc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) | ||
820 | { | ||
821 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAsc(...\func_get_args()); | ||
822 | } | ||
823 | |||
824 | public function sortAscAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) | ||
825 | { | ||
826 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAscAlpha(...\func_get_args()); | ||
827 | } | ||
828 | |||
829 | public function sortDesc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) | ||
830 | { | ||
831 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDesc(...\func_get_args()); | ||
832 | } | ||
833 | |||
834 | public function sortDescAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) | ||
835 | { | ||
836 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDescAlpha(...\func_get_args()); | ||
837 | } | ||
838 | |||
839 | public function srem($key, $member, ...$other_members) | ||
840 | { | ||
841 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); | ||
842 | } | ||
843 | |||
844 | public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
845 | { | ||
846 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
847 | } | ||
848 | |||
849 | public function strlen($key) | ||
850 | { | ||
851 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); | ||
852 | } | ||
853 | |||
854 | public function subscribe($channels, $callback) | ||
855 | { | ||
856 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); | ||
857 | } | ||
858 | |||
859 | public function swapdb($srcdb, $dstdb) | ||
860 | { | ||
861 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->swapdb(...\func_get_args()); | ||
862 | } | ||
863 | |||
864 | public function time() | ||
865 | { | ||
866 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); | ||
867 | } | ||
868 | |||
869 | public function ttl($key) | ||
870 | { | ||
871 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); | ||
872 | } | ||
873 | |||
874 | public function type($key) | ||
875 | { | ||
876 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); | ||
877 | } | ||
878 | |||
879 | public function unlink($key, ...$other_keys) | ||
880 | { | ||
881 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); | ||
882 | } | ||
883 | |||
884 | public function unsubscribe($channel, ...$other_channels) | ||
885 | { | ||
886 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); | ||
887 | } | ||
888 | |||
889 | public function unwatch() | ||
890 | { | ||
891 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); | ||
892 | } | ||
893 | |||
894 | public function wait($numslaves, $timeout) | ||
895 | { | ||
896 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); | ||
897 | } | ||
898 | |||
899 | public function watch($key, ...$other_keys) | ||
900 | { | ||
901 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); | ||
902 | } | ||
903 | |||
904 | public function xack($str_key, $str_group, $arr_ids) | ||
905 | { | ||
906 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); | ||
907 | } | ||
908 | |||
909 | public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) | ||
910 | { | ||
911 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); | ||
912 | } | ||
913 | |||
914 | public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) | ||
915 | { | ||
916 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); | ||
917 | } | ||
918 | |||
919 | public function xdel($str_key, $arr_ids) | ||
920 | { | ||
921 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); | ||
922 | } | ||
923 | |||
924 | public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) | ||
925 | { | ||
926 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); | ||
927 | } | ||
928 | |||
929 | public function xinfo($str_cmd, $str_key = null, $str_group = null) | ||
930 | { | ||
931 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); | ||
932 | } | ||
933 | |||
934 | public function xlen($key) | ||
935 | { | ||
936 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); | ||
937 | } | ||
938 | |||
939 | public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) | ||
940 | { | ||
941 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); | ||
942 | } | ||
943 | |||
944 | public function xrange($str_key, $str_start, $str_end, $i_count = null) | ||
945 | { | ||
946 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); | ||
947 | } | ||
948 | |||
949 | public function xread($arr_streams, $i_count = null, $i_block = null) | ||
950 | { | ||
951 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); | ||
952 | } | ||
953 | |||
954 | public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) | ||
955 | { | ||
956 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); | ||
957 | } | ||
958 | |||
959 | public function xrevrange($str_key, $str_start, $str_end, $i_count = null) | ||
960 | { | ||
961 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); | ||
962 | } | ||
963 | |||
964 | public function xtrim($str_key, $i_maxlen, $boo_approximate = null) | ||
965 | { | ||
966 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); | ||
967 | } | ||
968 | |||
969 | public function zAdd($key, $score, $value, ...$extra_args) | ||
970 | { | ||
971 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zAdd(...\func_get_args()); | ||
972 | } | ||
973 | |||
974 | public function zCard($key) | ||
975 | { | ||
976 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCard(...\func_get_args()); | ||
977 | } | ||
978 | |||
979 | public function zCount($key, $min, $max) | ||
980 | { | ||
981 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCount(...\func_get_args()); | ||
982 | } | ||
983 | |||
984 | public function zIncrBy($key, $value, $member) | ||
985 | { | ||
986 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zIncrBy(...\func_get_args()); | ||
987 | } | ||
988 | |||
989 | public function zLexCount($key, $min, $max) | ||
990 | { | ||
991 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zLexCount(...\func_get_args()); | ||
992 | } | ||
993 | |||
994 | public function zPopMax($key) | ||
995 | { | ||
996 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMax(...\func_get_args()); | ||
997 | } | ||
998 | |||
999 | public function zPopMin($key) | ||
1000 | { | ||
1001 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMin(...\func_get_args()); | ||
1002 | } | ||
1003 | |||
1004 | public function zRange($key, $start, $end, $scores = null) | ||
1005 | { | ||
1006 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRange(...\func_get_args()); | ||
1007 | } | ||
1008 | |||
1009 | public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) | ||
1010 | { | ||
1011 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByLex(...\func_get_args()); | ||
1012 | } | ||
1013 | |||
1014 | public function zRangeByScore($key, $start, $end, $options = null) | ||
1015 | { | ||
1016 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByScore(...\func_get_args()); | ||
1017 | } | ||
1018 | |||
1019 | public function zRank($key, $member) | ||
1020 | { | ||
1021 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRank(...\func_get_args()); | ||
1022 | } | ||
1023 | |||
1024 | public function zRem($key, $member, ...$other_members) | ||
1025 | { | ||
1026 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRem(...\func_get_args()); | ||
1027 | } | ||
1028 | |||
1029 | public function zRemRangeByLex($key, $min, $max) | ||
1030 | { | ||
1031 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByLex(...\func_get_args()); | ||
1032 | } | ||
1033 | |||
1034 | public function zRemRangeByRank($key, $start, $end) | ||
1035 | { | ||
1036 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByRank(...\func_get_args()); | ||
1037 | } | ||
1038 | |||
1039 | public function zRemRangeByScore($key, $min, $max) | ||
1040 | { | ||
1041 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByScore(...\func_get_args()); | ||
1042 | } | ||
1043 | |||
1044 | public function zRevRange($key, $start, $end, $scores = null) | ||
1045 | { | ||
1046 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRange(...\func_get_args()); | ||
1047 | } | ||
1048 | |||
1049 | public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) | ||
1050 | { | ||
1051 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByLex(...\func_get_args()); | ||
1052 | } | ||
1053 | |||
1054 | public function zRevRangeByScore($key, $start, $end, $options = null) | ||
1055 | { | ||
1056 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByScore(...\func_get_args()); | ||
1057 | } | ||
1058 | |||
1059 | public function zRevRank($key, $member) | ||
1060 | { | ||
1061 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRank(...\func_get_args()); | ||
1062 | } | ||
1063 | |||
1064 | public function zScore($key, $member) | ||
1065 | { | ||
1066 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zScore(...\func_get_args()); | ||
1067 | } | ||
1068 | |||
1069 | public function zinterstore($key, $keys, $weights = null, $aggregate = null) | ||
1070 | { | ||
1071 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); | ||
1072 | } | ||
1073 | |||
1074 | public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
1075 | { | ||
1076 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
1077 | } | ||
1078 | |||
1079 | public function zunionstore($key, $keys, $weights = null, $aggregate = null) | ||
1080 | { | ||
1081 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); | ||
1082 | } | ||
1083 | |||
1084 | public function delete($key, ...$other_keys) | ||
1085 | { | ||
1086 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->delete(...\func_get_args()); | ||
1087 | } | ||
1088 | |||
1089 | public function evaluate($script, $args = null, $num_keys = null) | ||
1090 | { | ||
1091 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evaluate(...\func_get_args()); | ||
1092 | } | ||
1093 | |||
1094 | public function evaluateSha($script_sha, $args = null, $num_keys = null) | ||
1095 | { | ||
1096 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evaluateSha(...\func_get_args()); | ||
1097 | } | ||
1098 | |||
1099 | public function getKeys($pattern) | ||
1100 | { | ||
1101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getKeys(...\func_get_args()); | ||
1102 | } | ||
1103 | |||
1104 | public function getMultiple($keys) | ||
1105 | { | ||
1106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMultiple(...\func_get_args()); | ||
1107 | } | ||
1108 | |||
1109 | public function lGet($key, $index) | ||
1110 | { | ||
1111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lGet(...\func_get_args()); | ||
1112 | } | ||
1113 | |||
1114 | public function lGetRange($key, $start, $end) | ||
1115 | { | ||
1116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lGetRange(...\func_get_args()); | ||
1117 | } | ||
1118 | |||
1119 | public function lRemove($key, $value, $count) | ||
1120 | { | ||
1121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lRemove(...\func_get_args()); | ||
1122 | } | ||
1123 | |||
1124 | public function lSize($key) | ||
1125 | { | ||
1126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSize(...\func_get_args()); | ||
1127 | } | ||
1128 | |||
1129 | public function listTrim($key, $start, $stop) | ||
1130 | { | ||
1131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->listTrim(...\func_get_args()); | ||
1132 | } | ||
1133 | |||
1134 | public function open($host, $port = null, $timeout = null, $retry_interval = null) | ||
1135 | { | ||
1136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->open(...\func_get_args()); | ||
1137 | } | ||
1138 | |||
1139 | public function popen($host, $port = null, $timeout = null) | ||
1140 | { | ||
1141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->popen(...\func_get_args()); | ||
1142 | } | ||
1143 | |||
1144 | public function renameKey($key, $newkey) | ||
1145 | { | ||
1146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameKey(...\func_get_args()); | ||
1147 | } | ||
1148 | |||
1149 | public function sContains($key, $value) | ||
1150 | { | ||
1151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sContains(...\func_get_args()); | ||
1152 | } | ||
1153 | |||
1154 | public function sGetMembers($key) | ||
1155 | { | ||
1156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sGetMembers(...\func_get_args()); | ||
1157 | } | ||
1158 | |||
1159 | public function sRemove($key, $member, ...$other_members) | ||
1160 | { | ||
1161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRemove(...\func_get_args()); | ||
1162 | } | ||
1163 | |||
1164 | public function sSize($key) | ||
1165 | { | ||
1166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sSize(...\func_get_args()); | ||
1167 | } | ||
1168 | |||
1169 | public function sendEcho($msg) | ||
1170 | { | ||
1171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sendEcho(...\func_get_args()); | ||
1172 | } | ||
1173 | |||
1174 | public function setTimeout($key, $timeout) | ||
1175 | { | ||
1176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setTimeout(...\func_get_args()); | ||
1177 | } | ||
1178 | |||
1179 | public function substr($key, $start, $end) | ||
1180 | { | ||
1181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->substr(...\func_get_args()); | ||
1182 | } | ||
1183 | |||
1184 | public function zDelete($key, $member, ...$other_members) | ||
1185 | { | ||
1186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDelete(...\func_get_args()); | ||
1187 | } | ||
1188 | |||
1189 | public function zDeleteRangeByRank($key, $min, $max) | ||
1190 | { | ||
1191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDeleteRangeByRank(...\func_get_args()); | ||
1192 | } | ||
1193 | |||
1194 | public function zDeleteRangeByScore($key, $min, $max) | ||
1195 | { | ||
1196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zDeleteRangeByScore(...\func_get_args()); | ||
1197 | } | ||
1198 | |||
1199 | public function zInter($key, $keys, $weights = null, $aggregate = null) | ||
1200 | { | ||
1201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zInter(...\func_get_args()); | ||
1202 | } | ||
1203 | |||
1204 | public function zRemove($key, $member, ...$other_members) | ||
1205 | { | ||
1206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemove(...\func_get_args()); | ||
1207 | } | ||
1208 | |||
1209 | public function zRemoveRangeByScore($key, $min, $max) | ||
1210 | { | ||
1211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemoveRangeByScore(...\func_get_args()); | ||
1212 | } | ||
1213 | |||
1214 | public function zReverseRange($key, $start, $end, $scores = null) | ||
1215 | { | ||
1216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zReverseRange(...\func_get_args()); | ||
1217 | } | ||
1218 | |||
1219 | public function zSize($key) | ||
1220 | { | ||
1221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zSize(...\func_get_args()); | ||
1222 | } | ||
1223 | |||
1224 | public function zUnion($key, $keys, $weights = null, $aggregate = null) | ||
1225 | { | ||
1226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zUnion(...\func_get_args()); | ||
1227 | } | ||
1228 | } | ||
diff --git a/vendor/symfony/cache/Traits/Redis6Proxy.php b/vendor/symfony/cache/Traits/Redis6Proxy.php new file mode 100644 index 0000000..0680404 --- /dev/null +++ b/vendor/symfony/cache/Traits/Redis6Proxy.php | |||
@@ -0,0 +1,1293 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\VarExporter\LazyObjectInterface; | ||
15 | use Symfony\Component\VarExporter\LazyProxyTrait; | ||
16 | use Symfony\Contracts\Service\ResetInterface; | ||
17 | |||
18 | // Help opcache.preload discover always-needed symbols | ||
19 | class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); | ||
20 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); | ||
21 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); | ||
22 | |||
23 | /** | ||
24 | * @internal | ||
25 | */ | ||
26 | class Redis6Proxy extends \Redis implements ResetInterface, LazyObjectInterface | ||
27 | { | ||
28 | use LazyProxyTrait { | ||
29 | resetLazyObject as reset; | ||
30 | } | ||
31 | |||
32 | private const LAZY_OBJECT_PROPERTY_SCOPES = []; | ||
33 | |||
34 | public function __construct($options = null) | ||
35 | { | ||
36 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); | ||
37 | } | ||
38 | |||
39 | public function _compress($value): string | ||
40 | { | ||
41 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); | ||
42 | } | ||
43 | |||
44 | public function _uncompress($value): string | ||
45 | { | ||
46 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); | ||
47 | } | ||
48 | |||
49 | public function _prefix($key): string | ||
50 | { | ||
51 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); | ||
52 | } | ||
53 | |||
54 | public function _serialize($value): string | ||
55 | { | ||
56 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); | ||
57 | } | ||
58 | |||
59 | public function _unserialize($value): mixed | ||
60 | { | ||
61 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); | ||
62 | } | ||
63 | |||
64 | public function _pack($value): string | ||
65 | { | ||
66 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); | ||
67 | } | ||
68 | |||
69 | public function _unpack($value): mixed | ||
70 | { | ||
71 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); | ||
72 | } | ||
73 | |||
74 | public function acl($subcmd, ...$args): mixed | ||
75 | { | ||
76 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); | ||
77 | } | ||
78 | |||
79 | public function append($key, $value): \Redis|false|int | ||
80 | { | ||
81 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); | ||
82 | } | ||
83 | |||
84 | public function auth(#[\SensitiveParameter] $credentials): \Redis|bool | ||
85 | { | ||
86 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); | ||
87 | } | ||
88 | |||
89 | public function bgSave(): \Redis|bool | ||
90 | { | ||
91 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgSave(...\func_get_args()); | ||
92 | } | ||
93 | |||
94 | public function bgrewriteaof(): \Redis|bool | ||
95 | { | ||
96 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); | ||
97 | } | ||
98 | |||
99 | public function bitcount($key, $start = 0, $end = -1, $bybit = false): \Redis|false|int | ||
100 | { | ||
101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); | ||
102 | } | ||
103 | |||
104 | public function bitop($operation, $deskey, $srckey, ...$other_keys): \Redis|false|int | ||
105 | { | ||
106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); | ||
107 | } | ||
108 | |||
109 | public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \Redis|false|int | ||
110 | { | ||
111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); | ||
112 | } | ||
113 | |||
114 | public function blPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null | ||
115 | { | ||
116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blPop(...\func_get_args()); | ||
117 | } | ||
118 | |||
119 | public function brPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null | ||
120 | { | ||
121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brPop(...\func_get_args()); | ||
122 | } | ||
123 | |||
124 | public function brpoplpush($src, $dst, $timeout): \Redis|false|string | ||
125 | { | ||
126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); | ||
127 | } | ||
128 | |||
129 | public function bzPopMax($key, $timeout_or_key, ...$extra_args): \Redis|array|false | ||
130 | { | ||
131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMax(...\func_get_args()); | ||
132 | } | ||
133 | |||
134 | public function bzPopMin($key, $timeout_or_key, ...$extra_args): \Redis|array|false | ||
135 | { | ||
136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzPopMin(...\func_get_args()); | ||
137 | } | ||
138 | |||
139 | public function bzmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null | ||
140 | { | ||
141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); | ||
142 | } | ||
143 | |||
144 | public function zmpop($keys, $from, $count = 1): \Redis|array|false|null | ||
145 | { | ||
146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); | ||
147 | } | ||
148 | |||
149 | public function blmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null | ||
150 | { | ||
151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); | ||
152 | } | ||
153 | |||
154 | public function lmpop($keys, $from, $count = 1): \Redis|array|false|null | ||
155 | { | ||
156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); | ||
157 | } | ||
158 | |||
159 | public function clearLastError(): bool | ||
160 | { | ||
161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); | ||
162 | } | ||
163 | |||
164 | public function client($opt, ...$args): mixed | ||
165 | { | ||
166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); | ||
167 | } | ||
168 | |||
169 | public function close(): bool | ||
170 | { | ||
171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); | ||
172 | } | ||
173 | |||
174 | public function command($opt = null, ...$args): mixed | ||
175 | { | ||
176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); | ||
177 | } | ||
178 | |||
179 | public function config($operation, $key_or_settings = null, $value = null): mixed | ||
180 | { | ||
181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); | ||
182 | } | ||
183 | |||
184 | public function connect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool | ||
185 | { | ||
186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); | ||
187 | } | ||
188 | |||
189 | public function copy($src, $dst, $options = null): \Redis|bool | ||
190 | { | ||
191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); | ||
192 | } | ||
193 | |||
194 | public function dbSize(): \Redis|false|int | ||
195 | { | ||
196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbSize(...\func_get_args()); | ||
197 | } | ||
198 | |||
199 | public function debug($key): \Redis|string | ||
200 | { | ||
201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->debug(...\func_get_args()); | ||
202 | } | ||
203 | |||
204 | public function decr($key, $by = 1): \Redis|false|int | ||
205 | { | ||
206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); | ||
207 | } | ||
208 | |||
209 | public function decrBy($key, $value): \Redis|false|int | ||
210 | { | ||
211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrBy(...\func_get_args()); | ||
212 | } | ||
213 | |||
214 | public function del($key, ...$other_keys): \Redis|false|int | ||
215 | { | ||
216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); | ||
217 | } | ||
218 | |||
219 | public function delete($key, ...$other_keys): \Redis|false|int | ||
220 | { | ||
221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->delete(...\func_get_args()); | ||
222 | } | ||
223 | |||
224 | public function discard(): \Redis|bool | ||
225 | { | ||
226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); | ||
227 | } | ||
228 | |||
229 | public function dump($key): \Redis|string | ||
230 | { | ||
231 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); | ||
232 | } | ||
233 | |||
234 | public function echo($str): \Redis|false|string | ||
235 | { | ||
236 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); | ||
237 | } | ||
238 | |||
239 | public function eval($script, $args = [], $num_keys = 0): mixed | ||
240 | { | ||
241 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); | ||
242 | } | ||
243 | |||
244 | public function eval_ro($script_sha, $args = [], $num_keys = 0): mixed | ||
245 | { | ||
246 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); | ||
247 | } | ||
248 | |||
249 | public function evalsha($sha1, $args = [], $num_keys = 0): mixed | ||
250 | { | ||
251 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); | ||
252 | } | ||
253 | |||
254 | public function evalsha_ro($sha1, $args = [], $num_keys = 0): mixed | ||
255 | { | ||
256 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); | ||
257 | } | ||
258 | |||
259 | public function exec(): \Redis|array|false | ||
260 | { | ||
261 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); | ||
262 | } | ||
263 | |||
264 | public function exists($key, ...$other_keys): \Redis|bool|int | ||
265 | { | ||
266 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); | ||
267 | } | ||
268 | |||
269 | public function expire($key, $timeout, $mode = null): \Redis|bool | ||
270 | { | ||
271 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); | ||
272 | } | ||
273 | |||
274 | public function expireAt($key, $timestamp, $mode = null): \Redis|bool | ||
275 | { | ||
276 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireAt(...\func_get_args()); | ||
277 | } | ||
278 | |||
279 | public function failover($to = null, $abort = false, $timeout = 0): \Redis|bool | ||
280 | { | ||
281 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->failover(...\func_get_args()); | ||
282 | } | ||
283 | |||
284 | public function expiretime($key): \Redis|false|int | ||
285 | { | ||
286 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); | ||
287 | } | ||
288 | |||
289 | public function pexpiretime($key): \Redis|false|int | ||
290 | { | ||
291 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); | ||
292 | } | ||
293 | |||
294 | public function fcall($fn, $keys = [], $args = []): mixed | ||
295 | { | ||
296 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall(...\func_get_args()); | ||
297 | } | ||
298 | |||
299 | public function fcall_ro($fn, $keys = [], $args = []): mixed | ||
300 | { | ||
301 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall_ro(...\func_get_args()); | ||
302 | } | ||
303 | |||
304 | public function flushAll($sync = null): \Redis|bool | ||
305 | { | ||
306 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushAll(...\func_get_args()); | ||
307 | } | ||
308 | |||
309 | public function flushDB($sync = null): \Redis|bool | ||
310 | { | ||
311 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushDB(...\func_get_args()); | ||
312 | } | ||
313 | |||
314 | public function function($operation, ...$args): \Redis|array|bool|string | ||
315 | { | ||
316 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->function(...\func_get_args()); | ||
317 | } | ||
318 | |||
319 | public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Redis|false|int | ||
320 | { | ||
321 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); | ||
322 | } | ||
323 | |||
324 | public function geodist($key, $src, $dst, $unit = null): \Redis|false|float | ||
325 | { | ||
326 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); | ||
327 | } | ||
328 | |||
329 | public function geohash($key, $member, ...$other_members): \Redis|array|false | ||
330 | { | ||
331 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); | ||
332 | } | ||
333 | |||
334 | public function geopos($key, $member, ...$other_members): \Redis|array|false | ||
335 | { | ||
336 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); | ||
337 | } | ||
338 | |||
339 | public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
340 | { | ||
341 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); | ||
342 | } | ||
343 | |||
344 | public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
345 | { | ||
346 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); | ||
347 | } | ||
348 | |||
349 | public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed | ||
350 | { | ||
351 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); | ||
352 | } | ||
353 | |||
354 | public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed | ||
355 | { | ||
356 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); | ||
357 | } | ||
358 | |||
359 | public function geosearch($key, $position, $shape, $unit, $options = []): array | ||
360 | { | ||
361 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); | ||
362 | } | ||
363 | |||
364 | public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Redis|array|false|int | ||
365 | { | ||
366 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); | ||
367 | } | ||
368 | |||
369 | public function get($key): mixed | ||
370 | { | ||
371 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); | ||
372 | } | ||
373 | |||
374 | public function getAuth(): mixed | ||
375 | { | ||
376 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); | ||
377 | } | ||
378 | |||
379 | public function getBit($key, $idx): \Redis|false|int | ||
380 | { | ||
381 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBit(...\func_get_args()); | ||
382 | } | ||
383 | |||
384 | public function getEx($key, $options = []): \Redis|bool|string | ||
385 | { | ||
386 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getEx(...\func_get_args()); | ||
387 | } | ||
388 | |||
389 | public function getDBNum(): int | ||
390 | { | ||
391 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDBNum(...\func_get_args()); | ||
392 | } | ||
393 | |||
394 | public function getDel($key): \Redis|bool|string | ||
395 | { | ||
396 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDel(...\func_get_args()); | ||
397 | } | ||
398 | |||
399 | public function getHost(): string | ||
400 | { | ||
401 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); | ||
402 | } | ||
403 | |||
404 | public function getLastError(): ?string | ||
405 | { | ||
406 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); | ||
407 | } | ||
408 | |||
409 | public function getMode(): int | ||
410 | { | ||
411 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); | ||
412 | } | ||
413 | |||
414 | public function getOption($option): mixed | ||
415 | { | ||
416 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); | ||
417 | } | ||
418 | |||
419 | public function getPersistentID(): ?string | ||
420 | { | ||
421 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); | ||
422 | } | ||
423 | |||
424 | public function getPort(): int | ||
425 | { | ||
426 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); | ||
427 | } | ||
428 | |||
429 | public function getRange($key, $start, $end): \Redis|false|string | ||
430 | { | ||
431 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getRange(...\func_get_args()); | ||
432 | } | ||
433 | |||
434 | public function lcs($key1, $key2, $options = null): \Redis|array|false|int|string | ||
435 | { | ||
436 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); | ||
437 | } | ||
438 | |||
439 | public function getReadTimeout(): float | ||
440 | { | ||
441 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); | ||
442 | } | ||
443 | |||
444 | public function getset($key, $value): \Redis|false|string | ||
445 | { | ||
446 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); | ||
447 | } | ||
448 | |||
449 | public function getTimeout(): false|float | ||
450 | { | ||
451 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); | ||
452 | } | ||
453 | |||
454 | public function getTransferredBytes(): array | ||
455 | { | ||
456 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTransferredBytes(...\func_get_args()); | ||
457 | } | ||
458 | |||
459 | public function clearTransferredBytes(): void | ||
460 | { | ||
461 | ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearTransferredBytes(...\func_get_args()); | ||
462 | } | ||
463 | |||
464 | public function hDel($key, $field, ...$other_fields): \Redis|false|int | ||
465 | { | ||
466 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hDel(...\func_get_args()); | ||
467 | } | ||
468 | |||
469 | public function hExists($key, $field): \Redis|bool | ||
470 | { | ||
471 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hExists(...\func_get_args()); | ||
472 | } | ||
473 | |||
474 | public function hGet($key, $member): mixed | ||
475 | { | ||
476 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGet(...\func_get_args()); | ||
477 | } | ||
478 | |||
479 | public function hGetAll($key): \Redis|array|false | ||
480 | { | ||
481 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hGetAll(...\func_get_args()); | ||
482 | } | ||
483 | |||
484 | public function hIncrBy($key, $field, $value): \Redis|false|int | ||
485 | { | ||
486 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrBy(...\func_get_args()); | ||
487 | } | ||
488 | |||
489 | public function hIncrByFloat($key, $field, $value): \Redis|false|float | ||
490 | { | ||
491 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hIncrByFloat(...\func_get_args()); | ||
492 | } | ||
493 | |||
494 | public function hKeys($key): \Redis|array|false | ||
495 | { | ||
496 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hKeys(...\func_get_args()); | ||
497 | } | ||
498 | |||
499 | public function hLen($key): \Redis|false|int | ||
500 | { | ||
501 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hLen(...\func_get_args()); | ||
502 | } | ||
503 | |||
504 | public function hMget($key, $fields): \Redis|array|false | ||
505 | { | ||
506 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMget(...\func_get_args()); | ||
507 | } | ||
508 | |||
509 | public function hMset($key, $fieldvals): \Redis|bool | ||
510 | { | ||
511 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hMset(...\func_get_args()); | ||
512 | } | ||
513 | |||
514 | public function hRandField($key, $options = null): \Redis|array|string | ||
515 | { | ||
516 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hRandField(...\func_get_args()); | ||
517 | } | ||
518 | |||
519 | public function hSet($key, $member, $value): \Redis|false|int | ||
520 | { | ||
521 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSet(...\func_get_args()); | ||
522 | } | ||
523 | |||
524 | public function hSetNx($key, $field, $value): \Redis|bool | ||
525 | { | ||
526 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hSetNx(...\func_get_args()); | ||
527 | } | ||
528 | |||
529 | public function hStrLen($key, $field): \Redis|false|int | ||
530 | { | ||
531 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hStrLen(...\func_get_args()); | ||
532 | } | ||
533 | |||
534 | public function hVals($key): \Redis|array|false | ||
535 | { | ||
536 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hVals(...\func_get_args()); | ||
537 | } | ||
538 | |||
539 | public function hscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|bool | ||
540 | { | ||
541 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
542 | } | ||
543 | |||
544 | public function incr($key, $by = 1): \Redis|false|int | ||
545 | { | ||
546 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); | ||
547 | } | ||
548 | |||
549 | public function incrBy($key, $value): \Redis|false|int | ||
550 | { | ||
551 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrBy(...\func_get_args()); | ||
552 | } | ||
553 | |||
554 | public function incrByFloat($key, $value): \Redis|false|float | ||
555 | { | ||
556 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrByFloat(...\func_get_args()); | ||
557 | } | ||
558 | |||
559 | public function info(...$sections): \Redis|array|false | ||
560 | { | ||
561 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); | ||
562 | } | ||
563 | |||
564 | public function isConnected(): bool | ||
565 | { | ||
566 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); | ||
567 | } | ||
568 | |||
569 | public function keys($pattern) | ||
570 | { | ||
571 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); | ||
572 | } | ||
573 | |||
574 | public function lInsert($key, $pos, $pivot, $value) | ||
575 | { | ||
576 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lInsert(...\func_get_args()); | ||
577 | } | ||
578 | |||
579 | public function lLen($key): \Redis|false|int | ||
580 | { | ||
581 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lLen(...\func_get_args()); | ||
582 | } | ||
583 | |||
584 | public function lMove($src, $dst, $wherefrom, $whereto): \Redis|false|string | ||
585 | { | ||
586 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lMove(...\func_get_args()); | ||
587 | } | ||
588 | |||
589 | public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string | ||
590 | { | ||
591 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); | ||
592 | } | ||
593 | |||
594 | public function lPop($key, $count = 0): \Redis|array|bool|string | ||
595 | { | ||
596 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPop(...\func_get_args()); | ||
597 | } | ||
598 | |||
599 | public function lPos($key, $value, $options = null): \Redis|array|bool|int|null | ||
600 | { | ||
601 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPos(...\func_get_args()); | ||
602 | } | ||
603 | |||
604 | public function lPush($key, ...$elements): \Redis|false|int | ||
605 | { | ||
606 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPush(...\func_get_args()); | ||
607 | } | ||
608 | |||
609 | public function rPush($key, ...$elements): \Redis|false|int | ||
610 | { | ||
611 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPush(...\func_get_args()); | ||
612 | } | ||
613 | |||
614 | public function lPushx($key, $value): \Redis|false|int | ||
615 | { | ||
616 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lPushx(...\func_get_args()); | ||
617 | } | ||
618 | |||
619 | public function rPushx($key, $value): \Redis|false|int | ||
620 | { | ||
621 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPushx(...\func_get_args()); | ||
622 | } | ||
623 | |||
624 | public function lSet($key, $index, $value): \Redis|bool | ||
625 | { | ||
626 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lSet(...\func_get_args()); | ||
627 | } | ||
628 | |||
629 | public function lastSave(): int | ||
630 | { | ||
631 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastSave(...\func_get_args()); | ||
632 | } | ||
633 | |||
634 | public function lindex($key, $index): mixed | ||
635 | { | ||
636 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); | ||
637 | } | ||
638 | |||
639 | public function lrange($key, $start, $end): \Redis|array|false | ||
640 | { | ||
641 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); | ||
642 | } | ||
643 | |||
644 | public function lrem($key, $value, $count = 0): \Redis|false|int | ||
645 | { | ||
646 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); | ||
647 | } | ||
648 | |||
649 | public function ltrim($key, $start, $end): \Redis|bool | ||
650 | { | ||
651 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); | ||
652 | } | ||
653 | |||
654 | public function mget($keys): \Redis|array | ||
655 | { | ||
656 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); | ||
657 | } | ||
658 | |||
659 | public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Redis|bool | ||
660 | { | ||
661 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); | ||
662 | } | ||
663 | |||
664 | public function move($key, $index): \Redis|bool | ||
665 | { | ||
666 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); | ||
667 | } | ||
668 | |||
669 | public function mset($key_values): \Redis|bool | ||
670 | { | ||
671 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); | ||
672 | } | ||
673 | |||
674 | public function msetnx($key_values): \Redis|bool | ||
675 | { | ||
676 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); | ||
677 | } | ||
678 | |||
679 | public function multi($value = \Redis::MULTI): \Redis|bool | ||
680 | { | ||
681 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); | ||
682 | } | ||
683 | |||
684 | public function object($subcommand, $key): \Redis|false|int|string | ||
685 | { | ||
686 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); | ||
687 | } | ||
688 | |||
689 | public function open($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool | ||
690 | { | ||
691 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->open(...\func_get_args()); | ||
692 | } | ||
693 | |||
694 | public function pconnect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool | ||
695 | { | ||
696 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); | ||
697 | } | ||
698 | |||
699 | public function persist($key): \Redis|bool | ||
700 | { | ||
701 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); | ||
702 | } | ||
703 | |||
704 | public function pexpire($key, $timeout, $mode = null): bool | ||
705 | { | ||
706 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); | ||
707 | } | ||
708 | |||
709 | public function pexpireAt($key, $timestamp, $mode = null): \Redis|bool | ||
710 | { | ||
711 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireAt(...\func_get_args()); | ||
712 | } | ||
713 | |||
714 | public function pfadd($key, $elements): \Redis|int | ||
715 | { | ||
716 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); | ||
717 | } | ||
718 | |||
719 | public function pfcount($key_or_keys): \Redis|false|int | ||
720 | { | ||
721 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); | ||
722 | } | ||
723 | |||
724 | public function pfmerge($dst, $srckeys): \Redis|bool | ||
725 | { | ||
726 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); | ||
727 | } | ||
728 | |||
729 | public function ping($message = null): \Redis|bool|string | ||
730 | { | ||
731 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); | ||
732 | } | ||
733 | |||
734 | public function pipeline(): \Redis|bool | ||
735 | { | ||
736 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); | ||
737 | } | ||
738 | |||
739 | public function popen($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool | ||
740 | { | ||
741 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->popen(...\func_get_args()); | ||
742 | } | ||
743 | |||
744 | public function psetex($key, $expire, $value): \Redis|bool | ||
745 | { | ||
746 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); | ||
747 | } | ||
748 | |||
749 | public function psubscribe($patterns, $cb): bool | ||
750 | { | ||
751 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); | ||
752 | } | ||
753 | |||
754 | public function pttl($key): \Redis|false|int | ||
755 | { | ||
756 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); | ||
757 | } | ||
758 | |||
759 | public function publish($channel, $message): \Redis|false|int | ||
760 | { | ||
761 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); | ||
762 | } | ||
763 | |||
764 | public function pubsub($command, $arg = null): mixed | ||
765 | { | ||
766 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); | ||
767 | } | ||
768 | |||
769 | public function punsubscribe($patterns): \Redis|array|bool | ||
770 | { | ||
771 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); | ||
772 | } | ||
773 | |||
774 | public function rPop($key, $count = 0): \Redis|array|bool|string | ||
775 | { | ||
776 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rPop(...\func_get_args()); | ||
777 | } | ||
778 | |||
779 | public function randomKey(): \Redis|false|string | ||
780 | { | ||
781 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomKey(...\func_get_args()); | ||
782 | } | ||
783 | |||
784 | public function rawcommand($command, ...$args): mixed | ||
785 | { | ||
786 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); | ||
787 | } | ||
788 | |||
789 | public function rename($old_name, $new_name): \Redis|bool | ||
790 | { | ||
791 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); | ||
792 | } | ||
793 | |||
794 | public function renameNx($key_src, $key_dst): \Redis|bool | ||
795 | { | ||
796 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renameNx(...\func_get_args()); | ||
797 | } | ||
798 | |||
799 | public function restore($key, $ttl, $value, $options = null): \Redis|bool | ||
800 | { | ||
801 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); | ||
802 | } | ||
803 | |||
804 | public function role(): mixed | ||
805 | { | ||
806 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); | ||
807 | } | ||
808 | |||
809 | public function rpoplpush($srckey, $dstkey): \Redis|false|string | ||
810 | { | ||
811 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); | ||
812 | } | ||
813 | |||
814 | public function sAdd($key, $value, ...$other_values): \Redis|false|int | ||
815 | { | ||
816 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAdd(...\func_get_args()); | ||
817 | } | ||
818 | |||
819 | public function sAddArray($key, $values): int | ||
820 | { | ||
821 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sAddArray(...\func_get_args()); | ||
822 | } | ||
823 | |||
824 | public function sDiff($key, ...$other_keys): \Redis|array|false | ||
825 | { | ||
826 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiff(...\func_get_args()); | ||
827 | } | ||
828 | |||
829 | public function sDiffStore($dst, $key, ...$other_keys): \Redis|false|int | ||
830 | { | ||
831 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sDiffStore(...\func_get_args()); | ||
832 | } | ||
833 | |||
834 | public function sInter($key, ...$other_keys): \Redis|array|false | ||
835 | { | ||
836 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInter(...\func_get_args()); | ||
837 | } | ||
838 | |||
839 | public function sintercard($keys, $limit = -1): \Redis|false|int | ||
840 | { | ||
841 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); | ||
842 | } | ||
843 | |||
844 | public function sInterStore($key, ...$other_keys): \Redis|false|int | ||
845 | { | ||
846 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sInterStore(...\func_get_args()); | ||
847 | } | ||
848 | |||
849 | public function sMembers($key): \Redis|array|false | ||
850 | { | ||
851 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMembers(...\func_get_args()); | ||
852 | } | ||
853 | |||
854 | public function sMisMember($key, $member, ...$other_members): \Redis|array|false | ||
855 | { | ||
856 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMisMember(...\func_get_args()); | ||
857 | } | ||
858 | |||
859 | public function sMove($src, $dst, $value): \Redis|bool | ||
860 | { | ||
861 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sMove(...\func_get_args()); | ||
862 | } | ||
863 | |||
864 | public function sPop($key, $count = 0): \Redis|array|false|string | ||
865 | { | ||
866 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sPop(...\func_get_args()); | ||
867 | } | ||
868 | |||
869 | public function sRandMember($key, $count = 0): \Redis|array|false|string | ||
870 | { | ||
871 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sRandMember(...\func_get_args()); | ||
872 | } | ||
873 | |||
874 | public function sUnion($key, ...$other_keys): \Redis|array|false | ||
875 | { | ||
876 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnion(...\func_get_args()); | ||
877 | } | ||
878 | |||
879 | public function sUnionStore($dst, $key, ...$other_keys): \Redis|false|int | ||
880 | { | ||
881 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sUnionStore(...\func_get_args()); | ||
882 | } | ||
883 | |||
884 | public function save(): \Redis|bool | ||
885 | { | ||
886 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); | ||
887 | } | ||
888 | |||
889 | public function scan(&$iterator, $pattern = null, $count = 0, $type = null): array|false | ||
890 | { | ||
891 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); | ||
892 | } | ||
893 | |||
894 | public function scard($key): \Redis|false|int | ||
895 | { | ||
896 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); | ||
897 | } | ||
898 | |||
899 | public function script($command, ...$args): mixed | ||
900 | { | ||
901 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); | ||
902 | } | ||
903 | |||
904 | public function select($db): \Redis|bool | ||
905 | { | ||
906 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); | ||
907 | } | ||
908 | |||
909 | public function set($key, $value, $options = null): \Redis|bool|string | ||
910 | { | ||
911 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); | ||
912 | } | ||
913 | |||
914 | public function setBit($key, $idx, $value): \Redis|false|int | ||
915 | { | ||
916 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setBit(...\func_get_args()); | ||
917 | } | ||
918 | |||
919 | public function setRange($key, $index, $value): \Redis|false|int | ||
920 | { | ||
921 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setRange(...\func_get_args()); | ||
922 | } | ||
923 | |||
924 | public function setOption($option, $value): bool | ||
925 | { | ||
926 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); | ||
927 | } | ||
928 | |||
929 | public function setex($key, $expire, $value) | ||
930 | { | ||
931 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); | ||
932 | } | ||
933 | |||
934 | public function setnx($key, $value): \Redis|bool | ||
935 | { | ||
936 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); | ||
937 | } | ||
938 | |||
939 | public function sismember($key, $value): \Redis|bool | ||
940 | { | ||
941 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); | ||
942 | } | ||
943 | |||
944 | public function slaveof($host = null, $port = 6379): \Redis|bool | ||
945 | { | ||
946 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slaveof(...\func_get_args()); | ||
947 | } | ||
948 | |||
949 | public function replicaof($host = null, $port = 6379): \Redis|bool | ||
950 | { | ||
951 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->replicaof(...\func_get_args()); | ||
952 | } | ||
953 | |||
954 | public function touch($key_or_array, ...$more_keys): \Redis|false|int | ||
955 | { | ||
956 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); | ||
957 | } | ||
958 | |||
959 | public function slowlog($operation, $length = 0): mixed | ||
960 | { | ||
961 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); | ||
962 | } | ||
963 | |||
964 | public function sort($key, $options = null): mixed | ||
965 | { | ||
966 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); | ||
967 | } | ||
968 | |||
969 | public function sort_ro($key, $options = null): mixed | ||
970 | { | ||
971 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); | ||
972 | } | ||
973 | |||
974 | public function sortAsc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array | ||
975 | { | ||
976 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAsc(...\func_get_args()); | ||
977 | } | ||
978 | |||
979 | public function sortAscAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array | ||
980 | { | ||
981 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortAscAlpha(...\func_get_args()); | ||
982 | } | ||
983 | |||
984 | public function sortDesc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array | ||
985 | { | ||
986 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDesc(...\func_get_args()); | ||
987 | } | ||
988 | |||
989 | public function sortDescAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array | ||
990 | { | ||
991 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sortDescAlpha(...\func_get_args()); | ||
992 | } | ||
993 | |||
994 | public function srem($key, $value, ...$other_values): \Redis|false|int | ||
995 | { | ||
996 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); | ||
997 | } | ||
998 | |||
999 | public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false | ||
1000 | { | ||
1001 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
1002 | } | ||
1003 | |||
1004 | public function ssubscribe($channels, $cb): bool | ||
1005 | { | ||
1006 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ssubscribe(...\func_get_args()); | ||
1007 | } | ||
1008 | |||
1009 | public function strlen($key): \Redis|false|int | ||
1010 | { | ||
1011 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); | ||
1012 | } | ||
1013 | |||
1014 | public function subscribe($channels, $cb): bool | ||
1015 | { | ||
1016 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); | ||
1017 | } | ||
1018 | |||
1019 | public function sunsubscribe($channels): \Redis|array|bool | ||
1020 | { | ||
1021 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunsubscribe(...\func_get_args()); | ||
1022 | } | ||
1023 | |||
1024 | public function swapdb($src, $dst): \Redis|bool | ||
1025 | { | ||
1026 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->swapdb(...\func_get_args()); | ||
1027 | } | ||
1028 | |||
1029 | public function time(): \Redis|array | ||
1030 | { | ||
1031 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); | ||
1032 | } | ||
1033 | |||
1034 | public function ttl($key): \Redis|false|int | ||
1035 | { | ||
1036 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); | ||
1037 | } | ||
1038 | |||
1039 | public function type($key): \Redis|false|int | ||
1040 | { | ||
1041 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); | ||
1042 | } | ||
1043 | |||
1044 | public function unlink($key, ...$other_keys): \Redis|false|int | ||
1045 | { | ||
1046 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); | ||
1047 | } | ||
1048 | |||
1049 | public function unsubscribe($channels): \Redis|array|bool | ||
1050 | { | ||
1051 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); | ||
1052 | } | ||
1053 | |||
1054 | public function unwatch(): \Redis|bool | ||
1055 | { | ||
1056 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); | ||
1057 | } | ||
1058 | |||
1059 | public function watch($key, ...$other_keys): \Redis|bool | ||
1060 | { | ||
1061 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); | ||
1062 | } | ||
1063 | |||
1064 | public function wait($numreplicas, $timeout): false|int | ||
1065 | { | ||
1066 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); | ||
1067 | } | ||
1068 | |||
1069 | public function xack($key, $group, $ids): false|int | ||
1070 | { | ||
1071 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); | ||
1072 | } | ||
1073 | |||
1074 | public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Redis|false|string | ||
1075 | { | ||
1076 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); | ||
1077 | } | ||
1078 | |||
1079 | public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Redis|array|bool | ||
1080 | { | ||
1081 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); | ||
1082 | } | ||
1083 | |||
1084 | public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Redis|array|bool | ||
1085 | { | ||
1086 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); | ||
1087 | } | ||
1088 | |||
1089 | public function xdel($key, $ids): \Redis|false|int | ||
1090 | { | ||
1091 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); | ||
1092 | } | ||
1093 | |||
1094 | public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed | ||
1095 | { | ||
1096 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); | ||
1097 | } | ||
1098 | |||
1099 | public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed | ||
1100 | { | ||
1101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); | ||
1102 | } | ||
1103 | |||
1104 | public function xlen($key): \Redis|false|int | ||
1105 | { | ||
1106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); | ||
1107 | } | ||
1108 | |||
1109 | public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \Redis|array|false | ||
1110 | { | ||
1111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); | ||
1112 | } | ||
1113 | |||
1114 | public function xrange($key, $start, $end, $count = -1): \Redis|array|bool | ||
1115 | { | ||
1116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); | ||
1117 | } | ||
1118 | |||
1119 | public function xread($streams, $count = -1, $block = -1): \Redis|array|bool | ||
1120 | { | ||
1121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); | ||
1122 | } | ||
1123 | |||
1124 | public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Redis|array|bool | ||
1125 | { | ||
1126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); | ||
1127 | } | ||
1128 | |||
1129 | public function xrevrange($key, $end, $start, $count = -1): \Redis|array|bool | ||
1130 | { | ||
1131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); | ||
1132 | } | ||
1133 | |||
1134 | public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Redis|false|int | ||
1135 | { | ||
1136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); | ||
1137 | } | ||
1138 | |||
1139 | public function zAdd($key, $score_or_options, ...$more_scores_and_mems): \Redis|false|float|int | ||
1140 | { | ||
1141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zAdd(...\func_get_args()); | ||
1142 | } | ||
1143 | |||
1144 | public function zCard($key): \Redis|false|int | ||
1145 | { | ||
1146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCard(...\func_get_args()); | ||
1147 | } | ||
1148 | |||
1149 | public function zCount($key, $start, $end): \Redis|false|int | ||
1150 | { | ||
1151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zCount(...\func_get_args()); | ||
1152 | } | ||
1153 | |||
1154 | public function zIncrBy($key, $value, $member): \Redis|false|float | ||
1155 | { | ||
1156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zIncrBy(...\func_get_args()); | ||
1157 | } | ||
1158 | |||
1159 | public function zLexCount($key, $min, $max): \Redis|false|int | ||
1160 | { | ||
1161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zLexCount(...\func_get_args()); | ||
1162 | } | ||
1163 | |||
1164 | public function zMscore($key, $member, ...$other_members): \Redis|array|false | ||
1165 | { | ||
1166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zMscore(...\func_get_args()); | ||
1167 | } | ||
1168 | |||
1169 | public function zPopMax($key, $count = null): \Redis|array|false | ||
1170 | { | ||
1171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMax(...\func_get_args()); | ||
1172 | } | ||
1173 | |||
1174 | public function zPopMin($key, $count = null): \Redis|array|false | ||
1175 | { | ||
1176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zPopMin(...\func_get_args()); | ||
1177 | } | ||
1178 | |||
1179 | public function zRange($key, $start, $end, $options = null): \Redis|array|false | ||
1180 | { | ||
1181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRange(...\func_get_args()); | ||
1182 | } | ||
1183 | |||
1184 | public function zRangeByLex($key, $min, $max, $offset = -1, $count = -1): \Redis|array|false | ||
1185 | { | ||
1186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByLex(...\func_get_args()); | ||
1187 | } | ||
1188 | |||
1189 | public function zRangeByScore($key, $start, $end, $options = []): \Redis|array|false | ||
1190 | { | ||
1191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRangeByScore(...\func_get_args()); | ||
1192 | } | ||
1193 | |||
1194 | public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \Redis|false|int | ||
1195 | { | ||
1196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); | ||
1197 | } | ||
1198 | |||
1199 | public function zRandMember($key, $options = null): \Redis|array|string | ||
1200 | { | ||
1201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRandMember(...\func_get_args()); | ||
1202 | } | ||
1203 | |||
1204 | public function zRank($key, $member): \Redis|false|int | ||
1205 | { | ||
1206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRank(...\func_get_args()); | ||
1207 | } | ||
1208 | |||
1209 | public function zRem($key, $member, ...$other_members): \Redis|false|int | ||
1210 | { | ||
1211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRem(...\func_get_args()); | ||
1212 | } | ||
1213 | |||
1214 | public function zRemRangeByLex($key, $min, $max): \Redis|false|int | ||
1215 | { | ||
1216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByLex(...\func_get_args()); | ||
1217 | } | ||
1218 | |||
1219 | public function zRemRangeByRank($key, $start, $end): \Redis|false|int | ||
1220 | { | ||
1221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByRank(...\func_get_args()); | ||
1222 | } | ||
1223 | |||
1224 | public function zRemRangeByScore($key, $start, $end): \Redis|false|int | ||
1225 | { | ||
1226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRemRangeByScore(...\func_get_args()); | ||
1227 | } | ||
1228 | |||
1229 | public function zRevRange($key, $start, $end, $scores = null): \Redis|array|false | ||
1230 | { | ||
1231 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRange(...\func_get_args()); | ||
1232 | } | ||
1233 | |||
1234 | public function zRevRangeByLex($key, $max, $min, $offset = -1, $count = -1): \Redis|array|false | ||
1235 | { | ||
1236 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByLex(...\func_get_args()); | ||
1237 | } | ||
1238 | |||
1239 | public function zRevRangeByScore($key, $max, $min, $options = []): \Redis|array|false | ||
1240 | { | ||
1241 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRangeByScore(...\func_get_args()); | ||
1242 | } | ||
1243 | |||
1244 | public function zRevRank($key, $member): \Redis|false|int | ||
1245 | { | ||
1246 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zRevRank(...\func_get_args()); | ||
1247 | } | ||
1248 | |||
1249 | public function zScore($key, $member): \Redis|false|float | ||
1250 | { | ||
1251 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zScore(...\func_get_args()); | ||
1252 | } | ||
1253 | |||
1254 | public function zdiff($keys, $options = null): \Redis|array|false | ||
1255 | { | ||
1256 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); | ||
1257 | } | ||
1258 | |||
1259 | public function zdiffstore($dst, $keys): \Redis|false|int | ||
1260 | { | ||
1261 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); | ||
1262 | } | ||
1263 | |||
1264 | public function zinter($keys, $weights = null, $options = null): \Redis|array|false | ||
1265 | { | ||
1266 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); | ||
1267 | } | ||
1268 | |||
1269 | public function zintercard($keys, $limit = -1): \Redis|false|int | ||
1270 | { | ||
1271 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); | ||
1272 | } | ||
1273 | |||
1274 | public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int | ||
1275 | { | ||
1276 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); | ||
1277 | } | ||
1278 | |||
1279 | public function zscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|false | ||
1280 | { | ||
1281 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
1282 | } | ||
1283 | |||
1284 | public function zunion($keys, $weights = null, $options = null): \Redis|array|false | ||
1285 | { | ||
1286 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); | ||
1287 | } | ||
1288 | |||
1289 | public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int | ||
1290 | { | ||
1291 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); | ||
1292 | } | ||
1293 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisCluster5Proxy.php b/vendor/symfony/cache/Traits/RedisCluster5Proxy.php new file mode 100644 index 0000000..511c53d --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisCluster5Proxy.php | |||
@@ -0,0 +1,983 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\VarExporter\LazyObjectInterface; | ||
15 | use Symfony\Component\VarExporter\LazyProxyTrait; | ||
16 | use Symfony\Contracts\Service\ResetInterface; | ||
17 | |||
18 | // Help opcache.preload discover always-needed symbols | ||
19 | class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); | ||
20 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); | ||
21 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); | ||
22 | |||
23 | /** | ||
24 | * @internal | ||
25 | */ | ||
26 | class RedisCluster5Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface | ||
27 | { | ||
28 | use LazyProxyTrait { | ||
29 | resetLazyObject as reset; | ||
30 | } | ||
31 | |||
32 | private const LAZY_OBJECT_PROPERTY_SCOPES = []; | ||
33 | |||
34 | public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, #[\SensitiveParameter] $auth = null) | ||
35 | { | ||
36 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); | ||
37 | } | ||
38 | |||
39 | public function _masters() | ||
40 | { | ||
41 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_masters(...\func_get_args()); | ||
42 | } | ||
43 | |||
44 | public function _prefix($key) | ||
45 | { | ||
46 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); | ||
47 | } | ||
48 | |||
49 | public function _redir() | ||
50 | { | ||
51 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_redir(...\func_get_args()); | ||
52 | } | ||
53 | |||
54 | public function _serialize($value) | ||
55 | { | ||
56 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); | ||
57 | } | ||
58 | |||
59 | public function _unserialize($value) | ||
60 | { | ||
61 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); | ||
62 | } | ||
63 | |||
64 | public function _compress($value) | ||
65 | { | ||
66 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); | ||
67 | } | ||
68 | |||
69 | public function _uncompress($value) | ||
70 | { | ||
71 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); | ||
72 | } | ||
73 | |||
74 | public function _pack($value) | ||
75 | { | ||
76 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); | ||
77 | } | ||
78 | |||
79 | public function _unpack($value) | ||
80 | { | ||
81 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); | ||
82 | } | ||
83 | |||
84 | public function acl($key_or_address, $subcmd, ...$args) | ||
85 | { | ||
86 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); | ||
87 | } | ||
88 | |||
89 | public function append($key, $value) | ||
90 | { | ||
91 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); | ||
92 | } | ||
93 | |||
94 | public function bgrewriteaof($key_or_address) | ||
95 | { | ||
96 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); | ||
97 | } | ||
98 | |||
99 | public function bgsave($key_or_address) | ||
100 | { | ||
101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); | ||
102 | } | ||
103 | |||
104 | public function bitcount($key) | ||
105 | { | ||
106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); | ||
107 | } | ||
108 | |||
109 | public function bitop($operation, $ret_key, $key, ...$other_keys) | ||
110 | { | ||
111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); | ||
112 | } | ||
113 | |||
114 | public function bitpos($key, $bit, $start = null, $end = null) | ||
115 | { | ||
116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); | ||
117 | } | ||
118 | |||
119 | public function blpop($key, $timeout_or_key, ...$extra_args) | ||
120 | { | ||
121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); | ||
122 | } | ||
123 | |||
124 | public function brpop($key, $timeout_or_key, ...$extra_args) | ||
125 | { | ||
126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); | ||
127 | } | ||
128 | |||
129 | public function brpoplpush($src, $dst, $timeout) | ||
130 | { | ||
131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); | ||
132 | } | ||
133 | |||
134 | public function clearlasterror() | ||
135 | { | ||
136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearlasterror(...\func_get_args()); | ||
137 | } | ||
138 | |||
139 | public function bzpopmax($key, $timeout_or_key, ...$extra_args) | ||
140 | { | ||
141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); | ||
142 | } | ||
143 | |||
144 | public function bzpopmin($key, $timeout_or_key, ...$extra_args) | ||
145 | { | ||
146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); | ||
147 | } | ||
148 | |||
149 | public function client($key_or_address, $arg = null, ...$other_args) | ||
150 | { | ||
151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); | ||
152 | } | ||
153 | |||
154 | public function close() | ||
155 | { | ||
156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); | ||
157 | } | ||
158 | |||
159 | public function cluster($key_or_address, $arg = null, ...$other_args) | ||
160 | { | ||
161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cluster(...\func_get_args()); | ||
162 | } | ||
163 | |||
164 | public function command(...$args) | ||
165 | { | ||
166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); | ||
167 | } | ||
168 | |||
169 | public function config($key_or_address, $arg = null, ...$other_args) | ||
170 | { | ||
171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); | ||
172 | } | ||
173 | |||
174 | public function dbsize($key_or_address) | ||
175 | { | ||
176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); | ||
177 | } | ||
178 | |||
179 | public function decr($key) | ||
180 | { | ||
181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); | ||
182 | } | ||
183 | |||
184 | public function decrby($key, $value) | ||
185 | { | ||
186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); | ||
187 | } | ||
188 | |||
189 | public function del($key, ...$other_keys) | ||
190 | { | ||
191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); | ||
192 | } | ||
193 | |||
194 | public function discard() | ||
195 | { | ||
196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); | ||
197 | } | ||
198 | |||
199 | public function dump($key) | ||
200 | { | ||
201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); | ||
202 | } | ||
203 | |||
204 | public function echo($msg) | ||
205 | { | ||
206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); | ||
207 | } | ||
208 | |||
209 | public function eval($script, $args = null, $num_keys = null) | ||
210 | { | ||
211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); | ||
212 | } | ||
213 | |||
214 | public function evalsha($script_sha, $args = null, $num_keys = null) | ||
215 | { | ||
216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); | ||
217 | } | ||
218 | |||
219 | public function exec() | ||
220 | { | ||
221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); | ||
222 | } | ||
223 | |||
224 | public function exists($key) | ||
225 | { | ||
226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); | ||
227 | } | ||
228 | |||
229 | public function expire($key, $timeout) | ||
230 | { | ||
231 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); | ||
232 | } | ||
233 | |||
234 | public function expireat($key, $timestamp) | ||
235 | { | ||
236 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); | ||
237 | } | ||
238 | |||
239 | public function flushall($key_or_address, $async = null) | ||
240 | { | ||
241 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); | ||
242 | } | ||
243 | |||
244 | public function flushdb($key_or_address, $async = null) | ||
245 | { | ||
246 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); | ||
247 | } | ||
248 | |||
249 | public function geoadd($key, $lng, $lat, $member, ...$other_triples) | ||
250 | { | ||
251 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); | ||
252 | } | ||
253 | |||
254 | public function geodist($key, $src, $dst, $unit = null) | ||
255 | { | ||
256 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); | ||
257 | } | ||
258 | |||
259 | public function geohash($key, $member, ...$other_members) | ||
260 | { | ||
261 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); | ||
262 | } | ||
263 | |||
264 | public function geopos($key, $member, ...$other_members) | ||
265 | { | ||
266 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); | ||
267 | } | ||
268 | |||
269 | public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) | ||
270 | { | ||
271 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); | ||
272 | } | ||
273 | |||
274 | public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) | ||
275 | { | ||
276 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); | ||
277 | } | ||
278 | |||
279 | public function georadiusbymember($key, $member, $radius, $unit, $opts = null) | ||
280 | { | ||
281 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); | ||
282 | } | ||
283 | |||
284 | public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) | ||
285 | { | ||
286 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); | ||
287 | } | ||
288 | |||
289 | public function get($key) | ||
290 | { | ||
291 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); | ||
292 | } | ||
293 | |||
294 | public function getbit($key, $offset) | ||
295 | { | ||
296 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); | ||
297 | } | ||
298 | |||
299 | public function getlasterror() | ||
300 | { | ||
301 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getlasterror(...\func_get_args()); | ||
302 | } | ||
303 | |||
304 | public function getmode() | ||
305 | { | ||
306 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getmode(...\func_get_args()); | ||
307 | } | ||
308 | |||
309 | public function getoption($option) | ||
310 | { | ||
311 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getoption(...\func_get_args()); | ||
312 | } | ||
313 | |||
314 | public function getrange($key, $start, $end) | ||
315 | { | ||
316 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); | ||
317 | } | ||
318 | |||
319 | public function getset($key, $value) | ||
320 | { | ||
321 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); | ||
322 | } | ||
323 | |||
324 | public function hdel($key, $member, ...$other_members) | ||
325 | { | ||
326 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); | ||
327 | } | ||
328 | |||
329 | public function hexists($key, $member) | ||
330 | { | ||
331 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); | ||
332 | } | ||
333 | |||
334 | public function hget($key, $member) | ||
335 | { | ||
336 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); | ||
337 | } | ||
338 | |||
339 | public function hgetall($key) | ||
340 | { | ||
341 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); | ||
342 | } | ||
343 | |||
344 | public function hincrby($key, $member, $value) | ||
345 | { | ||
346 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); | ||
347 | } | ||
348 | |||
349 | public function hincrbyfloat($key, $member, $value) | ||
350 | { | ||
351 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); | ||
352 | } | ||
353 | |||
354 | public function hkeys($key) | ||
355 | { | ||
356 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); | ||
357 | } | ||
358 | |||
359 | public function hlen($key) | ||
360 | { | ||
361 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); | ||
362 | } | ||
363 | |||
364 | public function hmget($key, $keys) | ||
365 | { | ||
366 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); | ||
367 | } | ||
368 | |||
369 | public function hmset($key, $pairs) | ||
370 | { | ||
371 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); | ||
372 | } | ||
373 | |||
374 | public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
375 | { | ||
376 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
377 | } | ||
378 | |||
379 | public function hset($key, $member, $value) | ||
380 | { | ||
381 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); | ||
382 | } | ||
383 | |||
384 | public function hsetnx($key, $member, $value) | ||
385 | { | ||
386 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); | ||
387 | } | ||
388 | |||
389 | public function hstrlen($key, $member) | ||
390 | { | ||
391 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); | ||
392 | } | ||
393 | |||
394 | public function hvals($key) | ||
395 | { | ||
396 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); | ||
397 | } | ||
398 | |||
399 | public function incr($key) | ||
400 | { | ||
401 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); | ||
402 | } | ||
403 | |||
404 | public function incrby($key, $value) | ||
405 | { | ||
406 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); | ||
407 | } | ||
408 | |||
409 | public function incrbyfloat($key, $value) | ||
410 | { | ||
411 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); | ||
412 | } | ||
413 | |||
414 | public function info($key_or_address, $option = null) | ||
415 | { | ||
416 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); | ||
417 | } | ||
418 | |||
419 | public function keys($pattern) | ||
420 | { | ||
421 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); | ||
422 | } | ||
423 | |||
424 | public function lastsave($key_or_address) | ||
425 | { | ||
426 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); | ||
427 | } | ||
428 | |||
429 | public function lget($key, $index) | ||
430 | { | ||
431 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lget(...\func_get_args()); | ||
432 | } | ||
433 | |||
434 | public function lindex($key, $index) | ||
435 | { | ||
436 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); | ||
437 | } | ||
438 | |||
439 | public function linsert($key, $position, $pivot, $value) | ||
440 | { | ||
441 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); | ||
442 | } | ||
443 | |||
444 | public function llen($key) | ||
445 | { | ||
446 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); | ||
447 | } | ||
448 | |||
449 | public function lpop($key) | ||
450 | { | ||
451 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); | ||
452 | } | ||
453 | |||
454 | public function lpush($key, $value) | ||
455 | { | ||
456 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); | ||
457 | } | ||
458 | |||
459 | public function lpushx($key, $value) | ||
460 | { | ||
461 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); | ||
462 | } | ||
463 | |||
464 | public function lrange($key, $start, $end) | ||
465 | { | ||
466 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); | ||
467 | } | ||
468 | |||
469 | public function lrem($key, $value) | ||
470 | { | ||
471 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); | ||
472 | } | ||
473 | |||
474 | public function lset($key, $index, $value) | ||
475 | { | ||
476 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); | ||
477 | } | ||
478 | |||
479 | public function ltrim($key, $start, $stop) | ||
480 | { | ||
481 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); | ||
482 | } | ||
483 | |||
484 | public function mget($keys) | ||
485 | { | ||
486 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); | ||
487 | } | ||
488 | |||
489 | public function mset($pairs) | ||
490 | { | ||
491 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); | ||
492 | } | ||
493 | |||
494 | public function msetnx($pairs) | ||
495 | { | ||
496 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); | ||
497 | } | ||
498 | |||
499 | public function multi() | ||
500 | { | ||
501 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); | ||
502 | } | ||
503 | |||
504 | public function object($field, $key) | ||
505 | { | ||
506 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); | ||
507 | } | ||
508 | |||
509 | public function persist($key) | ||
510 | { | ||
511 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); | ||
512 | } | ||
513 | |||
514 | public function pexpire($key, $timestamp) | ||
515 | { | ||
516 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); | ||
517 | } | ||
518 | |||
519 | public function pexpireat($key, $timestamp) | ||
520 | { | ||
521 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); | ||
522 | } | ||
523 | |||
524 | public function pfadd($key, $elements) | ||
525 | { | ||
526 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); | ||
527 | } | ||
528 | |||
529 | public function pfcount($key) | ||
530 | { | ||
531 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); | ||
532 | } | ||
533 | |||
534 | public function pfmerge($dstkey, $keys) | ||
535 | { | ||
536 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); | ||
537 | } | ||
538 | |||
539 | public function ping($key_or_address) | ||
540 | { | ||
541 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); | ||
542 | } | ||
543 | |||
544 | public function psetex($key, $expire, $value) | ||
545 | { | ||
546 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); | ||
547 | } | ||
548 | |||
549 | public function psubscribe($patterns, $callback) | ||
550 | { | ||
551 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); | ||
552 | } | ||
553 | |||
554 | public function pttl($key) | ||
555 | { | ||
556 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); | ||
557 | } | ||
558 | |||
559 | public function publish($channel, $message) | ||
560 | { | ||
561 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); | ||
562 | } | ||
563 | |||
564 | public function pubsub($key_or_address, $arg = null, ...$other_args) | ||
565 | { | ||
566 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); | ||
567 | } | ||
568 | |||
569 | public function punsubscribe($pattern, ...$other_patterns) | ||
570 | { | ||
571 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); | ||
572 | } | ||
573 | |||
574 | public function randomkey($key_or_address) | ||
575 | { | ||
576 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); | ||
577 | } | ||
578 | |||
579 | public function rawcommand($cmd, ...$args) | ||
580 | { | ||
581 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); | ||
582 | } | ||
583 | |||
584 | public function rename($key, $newkey) | ||
585 | { | ||
586 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); | ||
587 | } | ||
588 | |||
589 | public function renamenx($key, $newkey) | ||
590 | { | ||
591 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); | ||
592 | } | ||
593 | |||
594 | public function restore($ttl, $key, $value) | ||
595 | { | ||
596 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); | ||
597 | } | ||
598 | |||
599 | public function role() | ||
600 | { | ||
601 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); | ||
602 | } | ||
603 | |||
604 | public function rpop($key) | ||
605 | { | ||
606 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); | ||
607 | } | ||
608 | |||
609 | public function rpoplpush($src, $dst) | ||
610 | { | ||
611 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); | ||
612 | } | ||
613 | |||
614 | public function rpush($key, $value) | ||
615 | { | ||
616 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); | ||
617 | } | ||
618 | |||
619 | public function rpushx($key, $value) | ||
620 | { | ||
621 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); | ||
622 | } | ||
623 | |||
624 | public function sadd($key, $value) | ||
625 | { | ||
626 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); | ||
627 | } | ||
628 | |||
629 | public function saddarray($key, $options) | ||
630 | { | ||
631 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->saddarray(...\func_get_args()); | ||
632 | } | ||
633 | |||
634 | public function save($key_or_address) | ||
635 | { | ||
636 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); | ||
637 | } | ||
638 | |||
639 | public function scan(&$i_iterator, $str_node, $str_pattern = null, $i_count = null) | ||
640 | { | ||
641 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); | ||
642 | } | ||
643 | |||
644 | public function scard($key) | ||
645 | { | ||
646 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); | ||
647 | } | ||
648 | |||
649 | public function script($key_or_address, $arg = null, ...$other_args) | ||
650 | { | ||
651 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); | ||
652 | } | ||
653 | |||
654 | public function sdiff($key, ...$other_keys) | ||
655 | { | ||
656 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); | ||
657 | } | ||
658 | |||
659 | public function sdiffstore($dst, $key, ...$other_keys) | ||
660 | { | ||
661 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); | ||
662 | } | ||
663 | |||
664 | public function set($key, $value, $opts = null) | ||
665 | { | ||
666 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); | ||
667 | } | ||
668 | |||
669 | public function setbit($key, $offset, $value) | ||
670 | { | ||
671 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); | ||
672 | } | ||
673 | |||
674 | public function setex($key, $expire, $value) | ||
675 | { | ||
676 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); | ||
677 | } | ||
678 | |||
679 | public function setnx($key, $value) | ||
680 | { | ||
681 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); | ||
682 | } | ||
683 | |||
684 | public function setoption($option, $value) | ||
685 | { | ||
686 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setoption(...\func_get_args()); | ||
687 | } | ||
688 | |||
689 | public function setrange($key, $offset, $value) | ||
690 | { | ||
691 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); | ||
692 | } | ||
693 | |||
694 | public function sinter($key, ...$other_keys) | ||
695 | { | ||
696 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); | ||
697 | } | ||
698 | |||
699 | public function sinterstore($dst, $key, ...$other_keys) | ||
700 | { | ||
701 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); | ||
702 | } | ||
703 | |||
704 | public function sismember($key, $value) | ||
705 | { | ||
706 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); | ||
707 | } | ||
708 | |||
709 | public function slowlog($key_or_address, $arg = null, ...$other_args) | ||
710 | { | ||
711 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); | ||
712 | } | ||
713 | |||
714 | public function smembers($key) | ||
715 | { | ||
716 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); | ||
717 | } | ||
718 | |||
719 | public function smove($src, $dst, $value) | ||
720 | { | ||
721 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); | ||
722 | } | ||
723 | |||
724 | public function sort($key, $options = null) | ||
725 | { | ||
726 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); | ||
727 | } | ||
728 | |||
729 | public function spop($key) | ||
730 | { | ||
731 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); | ||
732 | } | ||
733 | |||
734 | public function srandmember($key, $count = null) | ||
735 | { | ||
736 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); | ||
737 | } | ||
738 | |||
739 | public function srem($key, $value) | ||
740 | { | ||
741 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); | ||
742 | } | ||
743 | |||
744 | public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
745 | { | ||
746 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
747 | } | ||
748 | |||
749 | public function strlen($key) | ||
750 | { | ||
751 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); | ||
752 | } | ||
753 | |||
754 | public function subscribe($channels, $callback) | ||
755 | { | ||
756 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); | ||
757 | } | ||
758 | |||
759 | public function sunion($key, ...$other_keys) | ||
760 | { | ||
761 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); | ||
762 | } | ||
763 | |||
764 | public function sunionstore($dst, $key, ...$other_keys) | ||
765 | { | ||
766 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); | ||
767 | } | ||
768 | |||
769 | public function time() | ||
770 | { | ||
771 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); | ||
772 | } | ||
773 | |||
774 | public function ttl($key) | ||
775 | { | ||
776 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); | ||
777 | } | ||
778 | |||
779 | public function type($key) | ||
780 | { | ||
781 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); | ||
782 | } | ||
783 | |||
784 | public function unsubscribe($channel, ...$other_channels) | ||
785 | { | ||
786 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); | ||
787 | } | ||
788 | |||
789 | public function unlink($key, ...$other_keys) | ||
790 | { | ||
791 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); | ||
792 | } | ||
793 | |||
794 | public function unwatch() | ||
795 | { | ||
796 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); | ||
797 | } | ||
798 | |||
799 | public function watch($key, ...$other_keys) | ||
800 | { | ||
801 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); | ||
802 | } | ||
803 | |||
804 | public function xack($str_key, $str_group, $arr_ids) | ||
805 | { | ||
806 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); | ||
807 | } | ||
808 | |||
809 | public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) | ||
810 | { | ||
811 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); | ||
812 | } | ||
813 | |||
814 | public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) | ||
815 | { | ||
816 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); | ||
817 | } | ||
818 | |||
819 | public function xdel($str_key, $arr_ids) | ||
820 | { | ||
821 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); | ||
822 | } | ||
823 | |||
824 | public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) | ||
825 | { | ||
826 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); | ||
827 | } | ||
828 | |||
829 | public function xinfo($str_cmd, $str_key = null, $str_group = null) | ||
830 | { | ||
831 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); | ||
832 | } | ||
833 | |||
834 | public function xlen($key) | ||
835 | { | ||
836 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); | ||
837 | } | ||
838 | |||
839 | public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) | ||
840 | { | ||
841 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); | ||
842 | } | ||
843 | |||
844 | public function xrange($str_key, $str_start, $str_end, $i_count = null) | ||
845 | { | ||
846 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); | ||
847 | } | ||
848 | |||
849 | public function xread($arr_streams, $i_count = null, $i_block = null) | ||
850 | { | ||
851 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); | ||
852 | } | ||
853 | |||
854 | public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) | ||
855 | { | ||
856 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); | ||
857 | } | ||
858 | |||
859 | public function xrevrange($str_key, $str_start, $str_end, $i_count = null) | ||
860 | { | ||
861 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); | ||
862 | } | ||
863 | |||
864 | public function xtrim($str_key, $i_maxlen, $boo_approximate = null) | ||
865 | { | ||
866 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); | ||
867 | } | ||
868 | |||
869 | public function zadd($key, $score, $value, ...$extra_args) | ||
870 | { | ||
871 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); | ||
872 | } | ||
873 | |||
874 | public function zcard($key) | ||
875 | { | ||
876 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); | ||
877 | } | ||
878 | |||
879 | public function zcount($key, $min, $max) | ||
880 | { | ||
881 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); | ||
882 | } | ||
883 | |||
884 | public function zincrby($key, $value, $member) | ||
885 | { | ||
886 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); | ||
887 | } | ||
888 | |||
889 | public function zinterstore($key, $keys, $weights = null, $aggregate = null) | ||
890 | { | ||
891 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); | ||
892 | } | ||
893 | |||
894 | public function zlexcount($key, $min, $max) | ||
895 | { | ||
896 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); | ||
897 | } | ||
898 | |||
899 | public function zpopmax($key) | ||
900 | { | ||
901 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); | ||
902 | } | ||
903 | |||
904 | public function zpopmin($key) | ||
905 | { | ||
906 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); | ||
907 | } | ||
908 | |||
909 | public function zrange($key, $start, $end, $scores = null) | ||
910 | { | ||
911 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); | ||
912 | } | ||
913 | |||
914 | public function zrangebylex($key, $min, $max, $offset = null, $limit = null) | ||
915 | { | ||
916 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); | ||
917 | } | ||
918 | |||
919 | public function zrangebyscore($key, $start, $end, $options = null) | ||
920 | { | ||
921 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); | ||
922 | } | ||
923 | |||
924 | public function zrank($key, $member) | ||
925 | { | ||
926 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); | ||
927 | } | ||
928 | |||
929 | public function zrem($key, $member, ...$other_members) | ||
930 | { | ||
931 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); | ||
932 | } | ||
933 | |||
934 | public function zremrangebylex($key, $min, $max) | ||
935 | { | ||
936 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); | ||
937 | } | ||
938 | |||
939 | public function zremrangebyrank($key, $min, $max) | ||
940 | { | ||
941 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); | ||
942 | } | ||
943 | |||
944 | public function zremrangebyscore($key, $min, $max) | ||
945 | { | ||
946 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); | ||
947 | } | ||
948 | |||
949 | public function zrevrange($key, $start, $end, $scores = null) | ||
950 | { | ||
951 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); | ||
952 | } | ||
953 | |||
954 | public function zrevrangebylex($key, $min, $max, $offset = null, $limit = null) | ||
955 | { | ||
956 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); | ||
957 | } | ||
958 | |||
959 | public function zrevrangebyscore($key, $start, $end, $options = null) | ||
960 | { | ||
961 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); | ||
962 | } | ||
963 | |||
964 | public function zrevrank($key, $member) | ||
965 | { | ||
966 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); | ||
967 | } | ||
968 | |||
969 | public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) | ||
970 | { | ||
971 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); | ||
972 | } | ||
973 | |||
974 | public function zscore($key, $member) | ||
975 | { | ||
976 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); | ||
977 | } | ||
978 | |||
979 | public function zunionstore($key, $keys, $weights = null, $aggregate = null) | ||
980 | { | ||
981 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); | ||
982 | } | ||
983 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisCluster6Proxy.php b/vendor/symfony/cache/Traits/RedisCluster6Proxy.php new file mode 100644 index 0000000..fafc4ac --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisCluster6Proxy.php | |||
@@ -0,0 +1,1143 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\VarExporter\LazyObjectInterface; | ||
15 | use Symfony\Component\VarExporter\LazyProxyTrait; | ||
16 | use Symfony\Contracts\Service\ResetInterface; | ||
17 | |||
18 | // Help opcache.preload discover always-needed symbols | ||
19 | class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); | ||
20 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); | ||
21 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); | ||
22 | |||
23 | /** | ||
24 | * @internal | ||
25 | */ | ||
26 | class RedisCluster6Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface | ||
27 | { | ||
28 | use LazyProxyTrait { | ||
29 | resetLazyObject as reset; | ||
30 | } | ||
31 | |||
32 | private const LAZY_OBJECT_PROPERTY_SCOPES = []; | ||
33 | |||
34 | public function __construct($name, $seeds = null, $timeout = 0, $read_timeout = 0, $persistent = false, #[\SensitiveParameter] $auth = null, $context = null) | ||
35 | { | ||
36 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); | ||
37 | } | ||
38 | |||
39 | public function _compress($value): string | ||
40 | { | ||
41 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); | ||
42 | } | ||
43 | |||
44 | public function _uncompress($value): string | ||
45 | { | ||
46 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); | ||
47 | } | ||
48 | |||
49 | public function _serialize($value): bool|string | ||
50 | { | ||
51 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); | ||
52 | } | ||
53 | |||
54 | public function _unserialize($value): mixed | ||
55 | { | ||
56 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); | ||
57 | } | ||
58 | |||
59 | public function _pack($value): string | ||
60 | { | ||
61 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); | ||
62 | } | ||
63 | |||
64 | public function _unpack($value): mixed | ||
65 | { | ||
66 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); | ||
67 | } | ||
68 | |||
69 | public function _prefix($key): bool|string | ||
70 | { | ||
71 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); | ||
72 | } | ||
73 | |||
74 | public function _masters(): array | ||
75 | { | ||
76 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_masters(...\func_get_args()); | ||
77 | } | ||
78 | |||
79 | public function _redir(): ?string | ||
80 | { | ||
81 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_redir(...\func_get_args()); | ||
82 | } | ||
83 | |||
84 | public function acl($key_or_address, $subcmd, ...$args): mixed | ||
85 | { | ||
86 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); | ||
87 | } | ||
88 | |||
89 | public function append($key, $value): \RedisCluster|bool|int | ||
90 | { | ||
91 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); | ||
92 | } | ||
93 | |||
94 | public function bgrewriteaof($key_or_address): \RedisCluster|bool | ||
95 | { | ||
96 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); | ||
97 | } | ||
98 | |||
99 | public function bgsave($key_or_address): \RedisCluster|bool | ||
100 | { | ||
101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); | ||
102 | } | ||
103 | |||
104 | public function bitcount($key, $start = 0, $end = -1, $bybit = false): \RedisCluster|bool|int | ||
105 | { | ||
106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); | ||
107 | } | ||
108 | |||
109 | public function bitop($operation, $deskey, $srckey, ...$otherkeys): \RedisCluster|bool|int | ||
110 | { | ||
111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); | ||
112 | } | ||
113 | |||
114 | public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \RedisCluster|false|int | ||
115 | { | ||
116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); | ||
117 | } | ||
118 | |||
119 | public function blpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null | ||
120 | { | ||
121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); | ||
122 | } | ||
123 | |||
124 | public function brpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null | ||
125 | { | ||
126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); | ||
127 | } | ||
128 | |||
129 | public function brpoplpush($srckey, $deskey, $timeout): mixed | ||
130 | { | ||
131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); | ||
132 | } | ||
133 | |||
134 | public function lmove($src, $dst, $wherefrom, $whereto): \Redis|false|string | ||
135 | { | ||
136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmove(...\func_get_args()); | ||
137 | } | ||
138 | |||
139 | public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string | ||
140 | { | ||
141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); | ||
142 | } | ||
143 | |||
144 | public function bzpopmax($key, $timeout_or_key, ...$extra_args): array | ||
145 | { | ||
146 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); | ||
147 | } | ||
148 | |||
149 | public function bzpopmin($key, $timeout_or_key, ...$extra_args): array | ||
150 | { | ||
151 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); | ||
152 | } | ||
153 | |||
154 | public function bzmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null | ||
155 | { | ||
156 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); | ||
157 | } | ||
158 | |||
159 | public function zmpop($keys, $from, $count = 1): \RedisCluster|array|false|null | ||
160 | { | ||
161 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); | ||
162 | } | ||
163 | |||
164 | public function blmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null | ||
165 | { | ||
166 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); | ||
167 | } | ||
168 | |||
169 | public function lmpop($keys, $from, $count = 1): \RedisCluster|array|false|null | ||
170 | { | ||
171 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); | ||
172 | } | ||
173 | |||
174 | public function clearlasterror(): bool | ||
175 | { | ||
176 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearlasterror(...\func_get_args()); | ||
177 | } | ||
178 | |||
179 | public function client($key_or_address, $subcommand, $arg = null): array|bool|string | ||
180 | { | ||
181 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); | ||
182 | } | ||
183 | |||
184 | public function close(): bool | ||
185 | { | ||
186 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); | ||
187 | } | ||
188 | |||
189 | public function cluster($key_or_address, $command, ...$extra_args): mixed | ||
190 | { | ||
191 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cluster(...\func_get_args()); | ||
192 | } | ||
193 | |||
194 | public function command(...$extra_args): mixed | ||
195 | { | ||
196 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); | ||
197 | } | ||
198 | |||
199 | public function config($key_or_address, $subcommand, ...$extra_args): mixed | ||
200 | { | ||
201 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); | ||
202 | } | ||
203 | |||
204 | public function dbsize($key_or_address): \RedisCluster|int | ||
205 | { | ||
206 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); | ||
207 | } | ||
208 | |||
209 | public function copy($src, $dst, $options = null): \RedisCluster|bool | ||
210 | { | ||
211 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); | ||
212 | } | ||
213 | |||
214 | public function decr($key, $by = 1): \RedisCluster|false|int | ||
215 | { | ||
216 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); | ||
217 | } | ||
218 | |||
219 | public function decrby($key, $value): \RedisCluster|false|int | ||
220 | { | ||
221 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); | ||
222 | } | ||
223 | |||
224 | public function decrbyfloat($key, $value): float | ||
225 | { | ||
226 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrbyfloat(...\func_get_args()); | ||
227 | } | ||
228 | |||
229 | public function del($key, ...$other_keys): \RedisCluster|false|int | ||
230 | { | ||
231 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); | ||
232 | } | ||
233 | |||
234 | public function discard(): bool | ||
235 | { | ||
236 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); | ||
237 | } | ||
238 | |||
239 | public function dump($key): \RedisCluster|false|string | ||
240 | { | ||
241 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); | ||
242 | } | ||
243 | |||
244 | public function echo($key_or_address, $msg): \RedisCluster|false|string | ||
245 | { | ||
246 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); | ||
247 | } | ||
248 | |||
249 | public function eval($script, $args = [], $num_keys = 0): mixed | ||
250 | { | ||
251 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); | ||
252 | } | ||
253 | |||
254 | public function eval_ro($script, $args = [], $num_keys = 0): mixed | ||
255 | { | ||
256 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); | ||
257 | } | ||
258 | |||
259 | public function evalsha($script_sha, $args = [], $num_keys = 0): mixed | ||
260 | { | ||
261 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); | ||
262 | } | ||
263 | |||
264 | public function evalsha_ro($script_sha, $args = [], $num_keys = 0): mixed | ||
265 | { | ||
266 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); | ||
267 | } | ||
268 | |||
269 | public function exec(): array|false | ||
270 | { | ||
271 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); | ||
272 | } | ||
273 | |||
274 | public function exists($key, ...$other_keys): \RedisCluster|bool|int | ||
275 | { | ||
276 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); | ||
277 | } | ||
278 | |||
279 | public function touch($key, ...$other_keys): \RedisCluster|bool|int | ||
280 | { | ||
281 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); | ||
282 | } | ||
283 | |||
284 | public function expire($key, $timeout, $mode = null): \RedisCluster|bool | ||
285 | { | ||
286 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); | ||
287 | } | ||
288 | |||
289 | public function expireat($key, $timestamp, $mode = null): \RedisCluster|bool | ||
290 | { | ||
291 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); | ||
292 | } | ||
293 | |||
294 | public function expiretime($key): \RedisCluster|false|int | ||
295 | { | ||
296 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); | ||
297 | } | ||
298 | |||
299 | public function pexpiretime($key): \RedisCluster|false|int | ||
300 | { | ||
301 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); | ||
302 | } | ||
303 | |||
304 | public function flushall($key_or_address, $async = false): \RedisCluster|bool | ||
305 | { | ||
306 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); | ||
307 | } | ||
308 | |||
309 | public function flushdb($key_or_address, $async = false): \RedisCluster|bool | ||
310 | { | ||
311 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); | ||
312 | } | ||
313 | |||
314 | public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \RedisCluster|false|int | ||
315 | { | ||
316 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); | ||
317 | } | ||
318 | |||
319 | public function geodist($key, $src, $dest, $unit = null): \RedisCluster|false|float | ||
320 | { | ||
321 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); | ||
322 | } | ||
323 | |||
324 | public function geohash($key, $member, ...$other_members): \RedisCluster|array|false | ||
325 | { | ||
326 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); | ||
327 | } | ||
328 | |||
329 | public function geopos($key, $member, ...$other_members): \RedisCluster|array|false | ||
330 | { | ||
331 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); | ||
332 | } | ||
333 | |||
334 | public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
335 | { | ||
336 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); | ||
337 | } | ||
338 | |||
339 | public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
340 | { | ||
341 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); | ||
342 | } | ||
343 | |||
344 | public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed | ||
345 | { | ||
346 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); | ||
347 | } | ||
348 | |||
349 | public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed | ||
350 | { | ||
351 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); | ||
352 | } | ||
353 | |||
354 | public function geosearch($key, $position, $shape, $unit, $options = []): \RedisCluster|array | ||
355 | { | ||
356 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); | ||
357 | } | ||
358 | |||
359 | public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \RedisCluster|array|false|int | ||
360 | { | ||
361 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); | ||
362 | } | ||
363 | |||
364 | public function get($key): mixed | ||
365 | { | ||
366 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); | ||
367 | } | ||
368 | |||
369 | public function getbit($key, $value): \RedisCluster|false|int | ||
370 | { | ||
371 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); | ||
372 | } | ||
373 | |||
374 | public function getlasterror(): ?string | ||
375 | { | ||
376 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getlasterror(...\func_get_args()); | ||
377 | } | ||
378 | |||
379 | public function getmode(): int | ||
380 | { | ||
381 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getmode(...\func_get_args()); | ||
382 | } | ||
383 | |||
384 | public function getoption($option): mixed | ||
385 | { | ||
386 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getoption(...\func_get_args()); | ||
387 | } | ||
388 | |||
389 | public function getrange($key, $start, $end): \RedisCluster|false|string | ||
390 | { | ||
391 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); | ||
392 | } | ||
393 | |||
394 | public function lcs($key1, $key2, $options = null): \RedisCluster|array|false|int|string | ||
395 | { | ||
396 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); | ||
397 | } | ||
398 | |||
399 | public function getset($key, $value): \RedisCluster|bool|string | ||
400 | { | ||
401 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); | ||
402 | } | ||
403 | |||
404 | public function gettransferredbytes(): array|false | ||
405 | { | ||
406 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->gettransferredbytes(...\func_get_args()); | ||
407 | } | ||
408 | |||
409 | public function cleartransferredbytes(): void | ||
410 | { | ||
411 | ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->cleartransferredbytes(...\func_get_args()); | ||
412 | } | ||
413 | |||
414 | public function hdel($key, $member, ...$other_members): \RedisCluster|false|int | ||
415 | { | ||
416 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); | ||
417 | } | ||
418 | |||
419 | public function hexists($key, $member): \RedisCluster|bool | ||
420 | { | ||
421 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); | ||
422 | } | ||
423 | |||
424 | public function hget($key, $member): mixed | ||
425 | { | ||
426 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); | ||
427 | } | ||
428 | |||
429 | public function hgetall($key): \RedisCluster|array|false | ||
430 | { | ||
431 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); | ||
432 | } | ||
433 | |||
434 | public function hincrby($key, $member, $value): \RedisCluster|false|int | ||
435 | { | ||
436 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); | ||
437 | } | ||
438 | |||
439 | public function hincrbyfloat($key, $member, $value): \RedisCluster|false|float | ||
440 | { | ||
441 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); | ||
442 | } | ||
443 | |||
444 | public function hkeys($key): \RedisCluster|array|false | ||
445 | { | ||
446 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); | ||
447 | } | ||
448 | |||
449 | public function hlen($key): \RedisCluster|false|int | ||
450 | { | ||
451 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); | ||
452 | } | ||
453 | |||
454 | public function hmget($key, $keys): \RedisCluster|array|false | ||
455 | { | ||
456 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); | ||
457 | } | ||
458 | |||
459 | public function hmset($key, $key_values): \RedisCluster|bool | ||
460 | { | ||
461 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); | ||
462 | } | ||
463 | |||
464 | public function hscan($key, &$iterator, $pattern = null, $count = 0): array|bool | ||
465 | { | ||
466 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
467 | } | ||
468 | |||
469 | public function hrandfield($key, $options = null): \RedisCluster|array|string | ||
470 | { | ||
471 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hrandfield(...\func_get_args()); | ||
472 | } | ||
473 | |||
474 | public function hset($key, $member, $value): \RedisCluster|false|int | ||
475 | { | ||
476 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); | ||
477 | } | ||
478 | |||
479 | public function hsetnx($key, $member, $value): \RedisCluster|bool | ||
480 | { | ||
481 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); | ||
482 | } | ||
483 | |||
484 | public function hstrlen($key, $field): \RedisCluster|false|int | ||
485 | { | ||
486 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); | ||
487 | } | ||
488 | |||
489 | public function hvals($key): \RedisCluster|array|false | ||
490 | { | ||
491 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); | ||
492 | } | ||
493 | |||
494 | public function incr($key, $by = 1): \RedisCluster|false|int | ||
495 | { | ||
496 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); | ||
497 | } | ||
498 | |||
499 | public function incrby($key, $value): \RedisCluster|false|int | ||
500 | { | ||
501 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); | ||
502 | } | ||
503 | |||
504 | public function incrbyfloat($key, $value): \RedisCluster|false|float | ||
505 | { | ||
506 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); | ||
507 | } | ||
508 | |||
509 | public function info($key_or_address, ...$sections): \RedisCluster|array|false | ||
510 | { | ||
511 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); | ||
512 | } | ||
513 | |||
514 | public function keys($pattern): \RedisCluster|array|false | ||
515 | { | ||
516 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); | ||
517 | } | ||
518 | |||
519 | public function lastsave($key_or_address): \RedisCluster|false|int | ||
520 | { | ||
521 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); | ||
522 | } | ||
523 | |||
524 | public function lget($key, $index): \RedisCluster|bool|string | ||
525 | { | ||
526 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lget(...\func_get_args()); | ||
527 | } | ||
528 | |||
529 | public function lindex($key, $index): mixed | ||
530 | { | ||
531 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); | ||
532 | } | ||
533 | |||
534 | public function linsert($key, $pos, $pivot, $value): \RedisCluster|false|int | ||
535 | { | ||
536 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); | ||
537 | } | ||
538 | |||
539 | public function llen($key): \RedisCluster|bool|int | ||
540 | { | ||
541 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); | ||
542 | } | ||
543 | |||
544 | public function lpop($key, $count = 0): \RedisCluster|array|bool|string | ||
545 | { | ||
546 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); | ||
547 | } | ||
548 | |||
549 | public function lpos($key, $value, $options = null): \Redis|array|bool|int|null | ||
550 | { | ||
551 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpos(...\func_get_args()); | ||
552 | } | ||
553 | |||
554 | public function lpush($key, $value, ...$other_values): \RedisCluster|bool|int | ||
555 | { | ||
556 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); | ||
557 | } | ||
558 | |||
559 | public function lpushx($key, $value): \RedisCluster|bool|int | ||
560 | { | ||
561 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); | ||
562 | } | ||
563 | |||
564 | public function lrange($key, $start, $end): \RedisCluster|array|false | ||
565 | { | ||
566 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); | ||
567 | } | ||
568 | |||
569 | public function lrem($key, $value, $count = 0): \RedisCluster|bool|int | ||
570 | { | ||
571 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); | ||
572 | } | ||
573 | |||
574 | public function lset($key, $index, $value): \RedisCluster|bool | ||
575 | { | ||
576 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); | ||
577 | } | ||
578 | |||
579 | public function ltrim($key, $start, $end): \RedisCluster|bool | ||
580 | { | ||
581 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); | ||
582 | } | ||
583 | |||
584 | public function mget($keys): \RedisCluster|array|false | ||
585 | { | ||
586 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); | ||
587 | } | ||
588 | |||
589 | public function mset($key_values): \RedisCluster|bool | ||
590 | { | ||
591 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); | ||
592 | } | ||
593 | |||
594 | public function msetnx($key_values): \RedisCluster|array|false | ||
595 | { | ||
596 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); | ||
597 | } | ||
598 | |||
599 | public function multi($value = \Redis::MULTI): \RedisCluster|bool | ||
600 | { | ||
601 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); | ||
602 | } | ||
603 | |||
604 | public function object($subcommand, $key): \RedisCluster|false|int|string | ||
605 | { | ||
606 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); | ||
607 | } | ||
608 | |||
609 | public function persist($key): \RedisCluster|bool | ||
610 | { | ||
611 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); | ||
612 | } | ||
613 | |||
614 | public function pexpire($key, $timeout, $mode = null): \RedisCluster|bool | ||
615 | { | ||
616 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); | ||
617 | } | ||
618 | |||
619 | public function pexpireat($key, $timestamp, $mode = null): \RedisCluster|bool | ||
620 | { | ||
621 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); | ||
622 | } | ||
623 | |||
624 | public function pfadd($key, $elements): \RedisCluster|bool | ||
625 | { | ||
626 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); | ||
627 | } | ||
628 | |||
629 | public function pfcount($key): \RedisCluster|false|int | ||
630 | { | ||
631 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); | ||
632 | } | ||
633 | |||
634 | public function pfmerge($key, $keys): \RedisCluster|bool | ||
635 | { | ||
636 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); | ||
637 | } | ||
638 | |||
639 | public function ping($key_or_address, $message = null): mixed | ||
640 | { | ||
641 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); | ||
642 | } | ||
643 | |||
644 | public function psetex($key, $timeout, $value): \RedisCluster|bool | ||
645 | { | ||
646 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); | ||
647 | } | ||
648 | |||
649 | public function psubscribe($patterns, $callback): void | ||
650 | { | ||
651 | ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); | ||
652 | } | ||
653 | |||
654 | public function pttl($key): \RedisCluster|false|int | ||
655 | { | ||
656 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); | ||
657 | } | ||
658 | |||
659 | public function publish($channel, $message): \RedisCluster|bool | ||
660 | { | ||
661 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); | ||
662 | } | ||
663 | |||
664 | public function pubsub($key_or_address, ...$values): mixed | ||
665 | { | ||
666 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); | ||
667 | } | ||
668 | |||
669 | public function punsubscribe($pattern, ...$other_patterns): array|bool | ||
670 | { | ||
671 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); | ||
672 | } | ||
673 | |||
674 | public function randomkey($key_or_address): \RedisCluster|bool|string | ||
675 | { | ||
676 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); | ||
677 | } | ||
678 | |||
679 | public function rawcommand($key_or_address, $command, ...$args): mixed | ||
680 | { | ||
681 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawcommand(...\func_get_args()); | ||
682 | } | ||
683 | |||
684 | public function rename($key_src, $key_dst): \RedisCluster|bool | ||
685 | { | ||
686 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); | ||
687 | } | ||
688 | |||
689 | public function renamenx($key, $newkey): \RedisCluster|bool | ||
690 | { | ||
691 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); | ||
692 | } | ||
693 | |||
694 | public function restore($key, $timeout, $value, $options = null): \RedisCluster|bool | ||
695 | { | ||
696 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); | ||
697 | } | ||
698 | |||
699 | public function role($key_or_address): mixed | ||
700 | { | ||
701 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); | ||
702 | } | ||
703 | |||
704 | public function rpop($key, $count = 0): \RedisCluster|array|bool|string | ||
705 | { | ||
706 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); | ||
707 | } | ||
708 | |||
709 | public function rpoplpush($src, $dst): \RedisCluster|bool|string | ||
710 | { | ||
711 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); | ||
712 | } | ||
713 | |||
714 | public function rpush($key, ...$elements): \RedisCluster|false|int | ||
715 | { | ||
716 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); | ||
717 | } | ||
718 | |||
719 | public function rpushx($key, $value): \RedisCluster|bool|int | ||
720 | { | ||
721 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); | ||
722 | } | ||
723 | |||
724 | public function sadd($key, $value, ...$other_values): \RedisCluster|false|int | ||
725 | { | ||
726 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); | ||
727 | } | ||
728 | |||
729 | public function saddarray($key, $values): \RedisCluster|bool|int | ||
730 | { | ||
731 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->saddarray(...\func_get_args()); | ||
732 | } | ||
733 | |||
734 | public function save($key_or_address): \RedisCluster|bool | ||
735 | { | ||
736 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); | ||
737 | } | ||
738 | |||
739 | public function scan(&$iterator, $key_or_address, $pattern = null, $count = 0): array|bool | ||
740 | { | ||
741 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); | ||
742 | } | ||
743 | |||
744 | public function scard($key): \RedisCluster|false|int | ||
745 | { | ||
746 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); | ||
747 | } | ||
748 | |||
749 | public function script($key_or_address, ...$args): mixed | ||
750 | { | ||
751 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); | ||
752 | } | ||
753 | |||
754 | public function sdiff($key, ...$other_keys): \RedisCluster|array|false | ||
755 | { | ||
756 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); | ||
757 | } | ||
758 | |||
759 | public function sdiffstore($dst, $key, ...$other_keys): \RedisCluster|false|int | ||
760 | { | ||
761 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); | ||
762 | } | ||
763 | |||
764 | public function set($key, $value, $options = null): \RedisCluster|bool|string | ||
765 | { | ||
766 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); | ||
767 | } | ||
768 | |||
769 | public function setbit($key, $offset, $onoff): \RedisCluster|false|int | ||
770 | { | ||
771 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); | ||
772 | } | ||
773 | |||
774 | public function setex($key, $expire, $value): \RedisCluster|bool | ||
775 | { | ||
776 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); | ||
777 | } | ||
778 | |||
779 | public function setnx($key, $value): \RedisCluster|bool | ||
780 | { | ||
781 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); | ||
782 | } | ||
783 | |||
784 | public function setoption($option, $value): bool | ||
785 | { | ||
786 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setoption(...\func_get_args()); | ||
787 | } | ||
788 | |||
789 | public function setrange($key, $offset, $value): \RedisCluster|false|int | ||
790 | { | ||
791 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); | ||
792 | } | ||
793 | |||
794 | public function sinter($key, ...$other_keys): \RedisCluster|array|false | ||
795 | { | ||
796 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); | ||
797 | } | ||
798 | |||
799 | public function sintercard($keys, $limit = -1): \RedisCluster|false|int | ||
800 | { | ||
801 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); | ||
802 | } | ||
803 | |||
804 | public function sinterstore($key, ...$other_keys): \RedisCluster|false|int | ||
805 | { | ||
806 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); | ||
807 | } | ||
808 | |||
809 | public function sismember($key, $value): \RedisCluster|bool | ||
810 | { | ||
811 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); | ||
812 | } | ||
813 | |||
814 | public function smismember($key, $member, ...$other_members): \RedisCluster|array|false | ||
815 | { | ||
816 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smismember(...\func_get_args()); | ||
817 | } | ||
818 | |||
819 | public function slowlog($key_or_address, ...$args): mixed | ||
820 | { | ||
821 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); | ||
822 | } | ||
823 | |||
824 | public function smembers($key): \RedisCluster|array|false | ||
825 | { | ||
826 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); | ||
827 | } | ||
828 | |||
829 | public function smove($src, $dst, $member): \RedisCluster|bool | ||
830 | { | ||
831 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); | ||
832 | } | ||
833 | |||
834 | public function sort($key, $options = null): \RedisCluster|array|bool|int|string | ||
835 | { | ||
836 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); | ||
837 | } | ||
838 | |||
839 | public function sort_ro($key, $options = null): \RedisCluster|array|bool|int|string | ||
840 | { | ||
841 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); | ||
842 | } | ||
843 | |||
844 | public function spop($key, $count = 0): \RedisCluster|array|false|string | ||
845 | { | ||
846 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); | ||
847 | } | ||
848 | |||
849 | public function srandmember($key, $count = 0): \RedisCluster|array|false|string | ||
850 | { | ||
851 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); | ||
852 | } | ||
853 | |||
854 | public function srem($key, $value, ...$other_values): \RedisCluster|false|int | ||
855 | { | ||
856 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); | ||
857 | } | ||
858 | |||
859 | public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false | ||
860 | { | ||
861 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
862 | } | ||
863 | |||
864 | public function strlen($key): \RedisCluster|false|int | ||
865 | { | ||
866 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); | ||
867 | } | ||
868 | |||
869 | public function subscribe($channels, $cb): void | ||
870 | { | ||
871 | ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); | ||
872 | } | ||
873 | |||
874 | public function sunion($key, ...$other_keys): \RedisCluster|array|bool | ||
875 | { | ||
876 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); | ||
877 | } | ||
878 | |||
879 | public function sunionstore($dst, $key, ...$other_keys): \RedisCluster|false|int | ||
880 | { | ||
881 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); | ||
882 | } | ||
883 | |||
884 | public function time($key_or_address): \RedisCluster|array|bool | ||
885 | { | ||
886 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); | ||
887 | } | ||
888 | |||
889 | public function ttl($key): \RedisCluster|false|int | ||
890 | { | ||
891 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); | ||
892 | } | ||
893 | |||
894 | public function type($key): \RedisCluster|false|int | ||
895 | { | ||
896 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); | ||
897 | } | ||
898 | |||
899 | public function unsubscribe($channels): array|bool | ||
900 | { | ||
901 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); | ||
902 | } | ||
903 | |||
904 | public function unlink($key, ...$other_keys): \RedisCluster|false|int | ||
905 | { | ||
906 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); | ||
907 | } | ||
908 | |||
909 | public function unwatch(): bool | ||
910 | { | ||
911 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); | ||
912 | } | ||
913 | |||
914 | public function watch($key, ...$other_keys): \RedisCluster|bool | ||
915 | { | ||
916 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); | ||
917 | } | ||
918 | |||
919 | public function xack($key, $group, $ids): \RedisCluster|false|int | ||
920 | { | ||
921 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); | ||
922 | } | ||
923 | |||
924 | public function xadd($key, $id, $values, $maxlen = 0, $approx = false): \RedisCluster|false|string | ||
925 | { | ||
926 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); | ||
927 | } | ||
928 | |||
929 | public function xclaim($key, $group, $consumer, $min_iddle, $ids, $options): \RedisCluster|array|false|string | ||
930 | { | ||
931 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); | ||
932 | } | ||
933 | |||
934 | public function xdel($key, $ids): \RedisCluster|false|int | ||
935 | { | ||
936 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); | ||
937 | } | ||
938 | |||
939 | public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed | ||
940 | { | ||
941 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); | ||
942 | } | ||
943 | |||
944 | public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \RedisCluster|array|bool | ||
945 | { | ||
946 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); | ||
947 | } | ||
948 | |||
949 | public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed | ||
950 | { | ||
951 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); | ||
952 | } | ||
953 | |||
954 | public function xlen($key): \RedisCluster|false|int | ||
955 | { | ||
956 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); | ||
957 | } | ||
958 | |||
959 | public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \RedisCluster|array|false | ||
960 | { | ||
961 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); | ||
962 | } | ||
963 | |||
964 | public function xrange($key, $start, $end, $count = -1): \RedisCluster|array|bool | ||
965 | { | ||
966 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); | ||
967 | } | ||
968 | |||
969 | public function xread($streams, $count = -1, $block = -1): \RedisCluster|array|bool | ||
970 | { | ||
971 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); | ||
972 | } | ||
973 | |||
974 | public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \RedisCluster|array|bool | ||
975 | { | ||
976 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); | ||
977 | } | ||
978 | |||
979 | public function xrevrange($key, $start, $end, $count = -1): \RedisCluster|array|bool | ||
980 | { | ||
981 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); | ||
982 | } | ||
983 | |||
984 | public function xtrim($key, $maxlen, $approx = false, $minid = false, $limit = -1): \RedisCluster|false|int | ||
985 | { | ||
986 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); | ||
987 | } | ||
988 | |||
989 | public function zadd($key, $score_or_options, ...$more_scores_and_mems): \RedisCluster|false|float|int | ||
990 | { | ||
991 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); | ||
992 | } | ||
993 | |||
994 | public function zcard($key): \RedisCluster|false|int | ||
995 | { | ||
996 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); | ||
997 | } | ||
998 | |||
999 | public function zcount($key, $start, $end): \RedisCluster|false|int | ||
1000 | { | ||
1001 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); | ||
1002 | } | ||
1003 | |||
1004 | public function zincrby($key, $value, $member): \RedisCluster|false|float | ||
1005 | { | ||
1006 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); | ||
1007 | } | ||
1008 | |||
1009 | public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int | ||
1010 | { | ||
1011 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); | ||
1012 | } | ||
1013 | |||
1014 | public function zintercard($keys, $limit = -1): \RedisCluster|false|int | ||
1015 | { | ||
1016 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); | ||
1017 | } | ||
1018 | |||
1019 | public function zlexcount($key, $min, $max): \RedisCluster|false|int | ||
1020 | { | ||
1021 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); | ||
1022 | } | ||
1023 | |||
1024 | public function zpopmax($key, $value = null): \RedisCluster|array|bool | ||
1025 | { | ||
1026 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); | ||
1027 | } | ||
1028 | |||
1029 | public function zpopmin($key, $value = null): \RedisCluster|array|bool | ||
1030 | { | ||
1031 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); | ||
1032 | } | ||
1033 | |||
1034 | public function zrange($key, $start, $end, $options = null): \RedisCluster|array|bool | ||
1035 | { | ||
1036 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); | ||
1037 | } | ||
1038 | |||
1039 | public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \RedisCluster|false|int | ||
1040 | { | ||
1041 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); | ||
1042 | } | ||
1043 | |||
1044 | public function zrandmember($key, $options = null): \RedisCluster|array|string | ||
1045 | { | ||
1046 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrandmember(...\func_get_args()); | ||
1047 | } | ||
1048 | |||
1049 | public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \RedisCluster|array|false | ||
1050 | { | ||
1051 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); | ||
1052 | } | ||
1053 | |||
1054 | public function zrangebyscore($key, $start, $end, $options = []): \RedisCluster|array|false | ||
1055 | { | ||
1056 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); | ||
1057 | } | ||
1058 | |||
1059 | public function zrank($key, $member): \RedisCluster|false|int | ||
1060 | { | ||
1061 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); | ||
1062 | } | ||
1063 | |||
1064 | public function zrem($key, $value, ...$other_values): \RedisCluster|false|int | ||
1065 | { | ||
1066 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); | ||
1067 | } | ||
1068 | |||
1069 | public function zremrangebylex($key, $min, $max): \RedisCluster|false|int | ||
1070 | { | ||
1071 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); | ||
1072 | } | ||
1073 | |||
1074 | public function zremrangebyrank($key, $min, $max): \RedisCluster|false|int | ||
1075 | { | ||
1076 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); | ||
1077 | } | ||
1078 | |||
1079 | public function zremrangebyscore($key, $min, $max): \RedisCluster|false|int | ||
1080 | { | ||
1081 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); | ||
1082 | } | ||
1083 | |||
1084 | public function zrevrange($key, $min, $max, $options = null): \RedisCluster|array|bool | ||
1085 | { | ||
1086 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); | ||
1087 | } | ||
1088 | |||
1089 | public function zrevrangebylex($key, $min, $max, $options = null): \RedisCluster|array|bool | ||
1090 | { | ||
1091 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); | ||
1092 | } | ||
1093 | |||
1094 | public function zrevrangebyscore($key, $min, $max, $options = null): \RedisCluster|array|bool | ||
1095 | { | ||
1096 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); | ||
1097 | } | ||
1098 | |||
1099 | public function zrevrank($key, $member): \RedisCluster|false|int | ||
1100 | { | ||
1101 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); | ||
1102 | } | ||
1103 | |||
1104 | public function zscan($key, &$iterator, $pattern = null, $count = 0): \RedisCluster|array|bool | ||
1105 | { | ||
1106 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
1107 | } | ||
1108 | |||
1109 | public function zscore($key, $member): \RedisCluster|false|float | ||
1110 | { | ||
1111 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); | ||
1112 | } | ||
1113 | |||
1114 | public function zmscore($key, $member, ...$other_members): \Redis|array|false | ||
1115 | { | ||
1116 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmscore(...\func_get_args()); | ||
1117 | } | ||
1118 | |||
1119 | public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int | ||
1120 | { | ||
1121 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); | ||
1122 | } | ||
1123 | |||
1124 | public function zinter($keys, $weights = null, $options = null): \RedisCluster|array|false | ||
1125 | { | ||
1126 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); | ||
1127 | } | ||
1128 | |||
1129 | public function zdiffstore($dst, $keys): \RedisCluster|false|int | ||
1130 | { | ||
1131 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); | ||
1132 | } | ||
1133 | |||
1134 | public function zunion($keys, $weights = null, $options = null): \RedisCluster|array|false | ||
1135 | { | ||
1136 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); | ||
1137 | } | ||
1138 | |||
1139 | public function zdiff($keys, $options = null): \RedisCluster|array|false | ||
1140 | { | ||
1141 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); | ||
1142 | } | ||
1143 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php b/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php new file mode 100644 index 0000000..f5c0baa --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php | |||
@@ -0,0 +1,47 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | /** | ||
15 | * This file acts as a wrapper to the \RedisCluster implementation so it can accept the same type of calls as | ||
16 | * individual \Redis objects. | ||
17 | * | ||
18 | * Calls are made to individual nodes via: RedisCluster->{method}($host, ...args)' | ||
19 | * according to https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#directed-node-commands | ||
20 | * | ||
21 | * @author Jack Thomas <jack.thomas@solidalpha.com> | ||
22 | * | ||
23 | * @internal | ||
24 | */ | ||
25 | class RedisClusterNodeProxy | ||
26 | { | ||
27 | public function __construct( | ||
28 | private array $host, | ||
29 | private \RedisCluster $redis, | ||
30 | ) { | ||
31 | } | ||
32 | |||
33 | public function __call(string $method, array $args) | ||
34 | { | ||
35 | return $this->redis->{$method}($this->host, ...$args); | ||
36 | } | ||
37 | |||
38 | public function scan(&$iIterator, $strPattern = null, $iCount = null) | ||
39 | { | ||
40 | return $this->redis->scan($iIterator, $this->host, $strPattern, $iCount); | ||
41 | } | ||
42 | |||
43 | public function getOption($name) | ||
44 | { | ||
45 | return $this->redis->getOption($name); | ||
46 | } | ||
47 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisClusterProxy.php b/vendor/symfony/cache/Traits/RedisClusterProxy.php new file mode 100644 index 0000000..c67d534 --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisClusterProxy.php | |||
@@ -0,0 +1,23 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | class_alias(6.0 <= (float) phpversion('redis') ? RedisCluster6Proxy::class : RedisCluster5Proxy::class, RedisClusterProxy::class); | ||
15 | |||
16 | if (false) { | ||
17 | /** | ||
18 | * @internal | ||
19 | */ | ||
20 | class RedisClusterProxy extends \RedisCluster | ||
21 | { | ||
22 | } | ||
23 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisProxy.php b/vendor/symfony/cache/Traits/RedisProxy.php new file mode 100644 index 0000000..7f4537b --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisProxy.php | |||
@@ -0,0 +1,23 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | class_alias(6.0 <= (float) phpversion('redis') ? Redis6Proxy::class : Redis5Proxy::class, RedisProxy::class); | ||
15 | |||
16 | if (false) { | ||
17 | /** | ||
18 | * @internal | ||
19 | */ | ||
20 | class RedisProxy extends \Redis | ||
21 | { | ||
22 | } | ||
23 | } | ||
diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php new file mode 100644 index 0000000..a4fdc5d --- /dev/null +++ b/vendor/symfony/cache/Traits/RedisTrait.php | |||
@@ -0,0 +1,682 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Predis\Command\Redis\UNLINK; | ||
15 | use Predis\Connection\Aggregate\ClusterInterface; | ||
16 | use Predis\Connection\Aggregate\RedisCluster; | ||
17 | use Predis\Connection\Aggregate\ReplicationInterface; | ||
18 | use Predis\Connection\Cluster\ClusterInterface as Predis2ClusterInterface; | ||
19 | use Predis\Connection\Cluster\RedisCluster as Predis2RedisCluster; | ||
20 | use Predis\Response\ErrorInterface; | ||
21 | use Predis\Response\Status; | ||
22 | use Relay\Relay; | ||
23 | use Relay\Sentinel; | ||
24 | use Symfony\Component\Cache\Exception\CacheException; | ||
25 | use Symfony\Component\Cache\Exception\InvalidArgumentException; | ||
26 | use Symfony\Component\Cache\Marshaller\DefaultMarshaller; | ||
27 | use Symfony\Component\Cache\Marshaller\MarshallerInterface; | ||
28 | |||
29 | /** | ||
30 | * @author Aurimas Niekis <aurimas@niekis.lt> | ||
31 | * @author Nicolas Grekas <p@tchwork.com> | ||
32 | * | ||
33 | * @internal | ||
34 | */ | ||
35 | trait RedisTrait | ||
36 | { | ||
37 | private static array $defaultConnectionOptions = [ | ||
38 | 'class' => null, | ||
39 | 'persistent' => 0, | ||
40 | 'persistent_id' => null, | ||
41 | 'timeout' => 30, | ||
42 | 'read_timeout' => 0, | ||
43 | 'retry_interval' => 0, | ||
44 | 'tcp_keepalive' => 0, | ||
45 | 'lazy' => null, | ||
46 | 'redis_cluster' => false, | ||
47 | 'redis_sentinel' => null, | ||
48 | 'dbindex' => 0, | ||
49 | 'failover' => 'none', | ||
50 | 'ssl' => null, // see https://php.net/context.ssl | ||
51 | ]; | ||
52 | private \Redis|Relay|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis; | ||
53 | private MarshallerInterface $marshaller; | ||
54 | |||
55 | private function init(\Redis|Relay|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller): void | ||
56 | { | ||
57 | parent::__construct($namespace, $defaultLifetime); | ||
58 | |||
59 | if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { | ||
60 | throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); | ||
61 | } | ||
62 | |||
63 | if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) { | ||
64 | $options = clone $redis->getOptions(); | ||
65 | \Closure::bind(function () { $this->options['exceptions'] = false; }, $options, $options)(); | ||
66 | $redis = new $redis($redis->getConnection(), $options); | ||
67 | } | ||
68 | |||
69 | $this->redis = $redis; | ||
70 | $this->marshaller = $marshaller ?? new DefaultMarshaller(); | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * Creates a Redis connection using a DSN configuration. | ||
75 | * | ||
76 | * Example DSN: | ||
77 | * - redis://localhost | ||
78 | * - redis://example.com:1234 | ||
79 | * - redis://secret@example.com/13 | ||
80 | * - redis:///var/run/redis.sock | ||
81 | * - redis://secret@/var/run/redis.sock/13 | ||
82 | * | ||
83 | * @param array $options See self::$defaultConnectionOptions | ||
84 | * | ||
85 | * @throws InvalidArgumentException when the DSN is invalid | ||
86 | */ | ||
87 | public static function createConnection(#[\SensitiveParameter] string $dsn, array $options = []): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|Relay | ||
88 | { | ||
89 | if (str_starts_with($dsn, 'redis:')) { | ||
90 | $scheme = 'redis'; | ||
91 | } elseif (str_starts_with($dsn, 'rediss:')) { | ||
92 | $scheme = 'rediss'; | ||
93 | } else { | ||
94 | throw new InvalidArgumentException('Invalid Redis DSN: it does not start with "redis[s]:".'); | ||
95 | } | ||
96 | |||
97 | if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) { | ||
98 | throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.'); | ||
99 | } | ||
100 | |||
101 | $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?<user>[^:@]*+):)?(?<password>[^@]*+)@)?#', function ($m) use (&$auth) { | ||
102 | if (isset($m['password'])) { | ||
103 | if (\in_array($m['user'], ['', 'default'], true)) { | ||
104 | $auth = rawurldecode($m['password']); | ||
105 | } else { | ||
106 | $auth = [rawurldecode($m['user']), rawurldecode($m['password'])]; | ||
107 | } | ||
108 | |||
109 | if ('' === $auth) { | ||
110 | $auth = null; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | return 'file:'.($m[1] ?? ''); | ||
115 | }, $dsn); | ||
116 | |||
117 | if (false === $params = parse_url($params)) { | ||
118 | throw new InvalidArgumentException('Invalid Redis DSN.'); | ||
119 | } | ||
120 | |||
121 | $query = $hosts = []; | ||
122 | |||
123 | $tls = 'rediss' === $scheme; | ||
124 | $tcpScheme = $tls ? 'tls' : 'tcp'; | ||
125 | |||
126 | if (isset($params['query'])) { | ||
127 | parse_str($params['query'], $query); | ||
128 | |||
129 | if (isset($query['host'])) { | ||
130 | if (!\is_array($hosts = $query['host'])) { | ||
131 | throw new InvalidArgumentException('Invalid Redis DSN: query parameter "host" must be an array.'); | ||
132 | } | ||
133 | foreach ($hosts as $host => $parameters) { | ||
134 | if (\is_string($parameters)) { | ||
135 | parse_str($parameters, $parameters); | ||
136 | } | ||
137 | if (false === $i = strrpos($host, ':')) { | ||
138 | $hosts[$host] = ['scheme' => $tcpScheme, 'host' => $host, 'port' => 6379] + $parameters; | ||
139 | } elseif ($port = (int) substr($host, 1 + $i)) { | ||
140 | $hosts[$host] = ['scheme' => $tcpScheme, 'host' => substr($host, 0, $i), 'port' => $port] + $parameters; | ||
141 | } else { | ||
142 | $hosts[$host] = ['scheme' => 'unix', 'path' => substr($host, 0, $i)] + $parameters; | ||
143 | } | ||
144 | } | ||
145 | $hosts = array_values($hosts); | ||
146 | } | ||
147 | } | ||
148 | |||
149 | if (isset($params['host']) || isset($params['path'])) { | ||
150 | if (!isset($params['dbindex']) && isset($params['path'])) { | ||
151 | if (preg_match('#/(\d+)?$#', $params['path'], $m)) { | ||
152 | $params['dbindex'] = $m[1] ?? $query['dbindex'] ?? '0'; | ||
153 | $params['path'] = substr($params['path'], 0, -\strlen($m[0])); | ||
154 | } elseif (isset($params['host'])) { | ||
155 | throw new InvalidArgumentException('Invalid Redis DSN: parameter "dbindex" must be a number.'); | ||
156 | } | ||
157 | } | ||
158 | |||
159 | if (isset($params['host'])) { | ||
160 | array_unshift($hosts, ['scheme' => $tcpScheme, 'host' => $params['host'], 'port' => $params['port'] ?? 6379]); | ||
161 | } else { | ||
162 | array_unshift($hosts, ['scheme' => 'unix', 'path' => $params['path']]); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | if (!$hosts) { | ||
167 | throw new InvalidArgumentException('Invalid Redis DSN: missing host.'); | ||
168 | } | ||
169 | |||
170 | if (isset($params['dbindex'], $query['dbindex']) && $params['dbindex'] !== $query['dbindex']) { | ||
171 | throw new InvalidArgumentException('Invalid Redis DSN: path and query "dbindex" parameters mismatch.'); | ||
172 | } | ||
173 | |||
174 | $params += $query + $options + self::$defaultConnectionOptions; | ||
175 | |||
176 | if (isset($params['redis_sentinel']) && isset($params['sentinel_master'])) { | ||
177 | throw new InvalidArgumentException('Cannot use both "redis_sentinel" and "sentinel_master" at the same time.'); | ||
178 | } | ||
179 | |||
180 | $params['redis_sentinel'] ??= $params['sentinel_master'] ?? null; | ||
181 | |||
182 | if (isset($params['redis_sentinel']) && !class_exists(\Predis\Client::class) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) { | ||
183 | throw new CacheException('Redis Sentinel support requires one of: "predis/predis", "ext-redis >= 5.2", "ext-relay".'); | ||
184 | } | ||
185 | |||
186 | if (isset($params['lazy'])) { | ||
187 | $params['lazy'] = filter_var($params['lazy'], \FILTER_VALIDATE_BOOLEAN); | ||
188 | } | ||
189 | $params['redis_cluster'] = filter_var($params['redis_cluster'], \FILTER_VALIDATE_BOOLEAN); | ||
190 | |||
191 | if ($params['redis_cluster'] && isset($params['redis_sentinel'])) { | ||
192 | throw new InvalidArgumentException('Cannot use both "redis_cluster" and "redis_sentinel" at the same time.'); | ||
193 | } | ||
194 | |||
195 | $class = $params['class'] ?? match (true) { | ||
196 | $params['redis_cluster'] => \extension_loaded('redis') ? \RedisCluster::class : \Predis\Client::class, | ||
197 | isset($params['redis_sentinel']) => match (true) { | ||
198 | \extension_loaded('redis') => \Redis::class, | ||
199 | \extension_loaded('relay') => Relay::class, | ||
200 | default => \Predis\Client::class, | ||
201 | }, | ||
202 | 1 < \count($hosts) && \extension_loaded('redis') => 1 < \count($hosts) ? \RedisArray::class : \Redis::class, | ||
203 | \extension_loaded('redis') => \Redis::class, | ||
204 | \extension_loaded('relay') => Relay::class, | ||
205 | default => \Predis\Client::class, | ||
206 | }; | ||
207 | |||
208 | if (isset($params['redis_sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) { | ||
209 | throw new CacheException(sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class)); | ||
210 | } | ||
211 | |||
212 | $isRedisExt = is_a($class, \Redis::class, true); | ||
213 | $isRelayExt = !$isRedisExt && is_a($class, Relay::class, true); | ||
214 | |||
215 | if ($isRedisExt || $isRelayExt) { | ||
216 | $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; | ||
217 | |||
218 | $initializer = static function () use ($class, $isRedisExt, $connect, $params, $auth, $hosts, $tls) { | ||
219 | $sentinelClass = $isRedisExt ? \RedisSentinel::class : Sentinel::class; | ||
220 | $redis = new $class(); | ||
221 | $hostIndex = 0; | ||
222 | do { | ||
223 | $host = $hosts[$hostIndex]['host'] ?? $hosts[$hostIndex]['path']; | ||
224 | $port = $hosts[$hostIndex]['port'] ?? 0; | ||
225 | $passAuth = isset($params['auth']) && (!$isRedisExt || \defined('Redis::OPT_NULL_MULTIBULK_AS_NULL')); | ||
226 | $address = false; | ||
227 | |||
228 | if (isset($hosts[$hostIndex]['host']) && $tls) { | ||
229 | $host = 'tls://'.$host; | ||
230 | } | ||
231 | |||
232 | if (!isset($params['redis_sentinel'])) { | ||
233 | break; | ||
234 | } | ||
235 | |||
236 | try { | ||
237 | if (version_compare(phpversion('redis'), '6.0.0', '>=') && $isRedisExt) { | ||
238 | $options = [ | ||
239 | 'host' => $host, | ||
240 | 'port' => $port, | ||
241 | 'connectTimeout' => $params['timeout'], | ||
242 | 'persistent' => $params['persistent_id'], | ||
243 | 'retryInterval' => $params['retry_interval'], | ||
244 | 'readTimeout' => $params['read_timeout'], | ||
245 | ]; | ||
246 | |||
247 | if ($passAuth) { | ||
248 | $options['auth'] = $params['auth']; | ||
249 | } | ||
250 | |||
251 | $sentinel = new \RedisSentinel($options); | ||
252 | } else { | ||
253 | $extra = $passAuth ? [$params['auth']] : []; | ||
254 | |||
255 | $sentinel = new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra); | ||
256 | } | ||
257 | |||
258 | if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) { | ||
259 | [$host, $port] = $address; | ||
260 | } | ||
261 | } catch (\RedisException|\Relay\Exception $redisException) { | ||
262 | } | ||
263 | } while (++$hostIndex < \count($hosts) && !$address); | ||
264 | |||
265 | if (isset($params['redis_sentinel']) && !$address) { | ||
266 | throw new InvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null); | ||
267 | } | ||
268 | |||
269 | try { | ||
270 | $extra = [ | ||
271 | 'stream' => $params['ssl'] ?? null, | ||
272 | ]; | ||
273 | $booleanStreamOptions = [ | ||
274 | 'allow_self_signed', | ||
275 | 'capture_peer_cert', | ||
276 | 'capture_peer_cert_chain', | ||
277 | 'disable_compression', | ||
278 | 'SNI_enabled', | ||
279 | 'verify_peer', | ||
280 | 'verify_peer_name', | ||
281 | ]; | ||
282 | |||
283 | foreach ($extra['stream'] ?? [] as $streamOption => $value) { | ||
284 | if (\in_array($streamOption, $booleanStreamOptions, true) && \is_string($value)) { | ||
285 | $extra['stream'][$streamOption] = filter_var($value, \FILTER_VALIDATE_BOOL); | ||
286 | } | ||
287 | } | ||
288 | |||
289 | if (isset($params['auth'])) { | ||
290 | $extra['auth'] = $params['auth']; | ||
291 | } | ||
292 | @$redis->{$connect}($host, $port, (float) $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') || !$isRedisExt ? [$extra] : []); | ||
293 | |||
294 | set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); | ||
295 | try { | ||
296 | $isConnected = $redis->isConnected(); | ||
297 | } finally { | ||
298 | restore_error_handler(); | ||
299 | } | ||
300 | if (!$isConnected) { | ||
301 | $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? sprintf(' (%s)', $error[1]) : ''; | ||
302 | throw new InvalidArgumentException('Redis connection failed: '.$error.'.'); | ||
303 | } | ||
304 | |||
305 | if ((null !== $auth && !$redis->auth($auth)) | ||
306 | // Due to a bug in phpredis we must always select the dbindex if persistent pooling is enabled | ||
307 | // @see https://github.com/phpredis/phpredis/issues/1920 | ||
308 | // @see https://github.com/symfony/symfony/issues/51578 | ||
309 | || (($params['dbindex'] || ('pconnect' === $connect && '0' !== \ini_get('redis.pconnect.pooling_enabled'))) && !$redis->select($params['dbindex'])) | ||
310 | ) { | ||
311 | $e = preg_replace('/^ERR /', '', $redis->getLastError()); | ||
312 | throw new InvalidArgumentException('Redis connection failed: '.$e.'.'); | ||
313 | } | ||
314 | |||
315 | if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { | ||
316 | $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); | ||
317 | } | ||
318 | } catch (\RedisException|\Relay\Exception $e) { | ||
319 | throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); | ||
320 | } | ||
321 | |||
322 | return $redis; | ||
323 | }; | ||
324 | |||
325 | if ($params['lazy']) { | ||
326 | $redis = $isRedisExt ? RedisProxy::createLazyProxy($initializer) : RelayProxy::createLazyProxy($initializer); | ||
327 | } else { | ||
328 | $redis = $initializer(); | ||
329 | } | ||
330 | } elseif (is_a($class, \RedisArray::class, true)) { | ||
331 | foreach ($hosts as $i => $host) { | ||
332 | $hosts[$i] = match ($host['scheme']) { | ||
333 | 'tcp' => $host['host'].':'.$host['port'], | ||
334 | 'tls' => 'tls://'.$host['host'].':'.$host['port'], | ||
335 | default => $host['path'], | ||
336 | }; | ||
337 | } | ||
338 | $params['lazy_connect'] = $params['lazy'] ?? true; | ||
339 | $params['connect_timeout'] = $params['timeout']; | ||
340 | |||
341 | try { | ||
342 | $redis = new $class($hosts, $params); | ||
343 | } catch (\RedisClusterException $e) { | ||
344 | throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); | ||
345 | } | ||
346 | |||
347 | if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { | ||
348 | $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); | ||
349 | } | ||
350 | } elseif (is_a($class, \RedisCluster::class, true)) { | ||
351 | $initializer = static function () use ($isRedisExt, $class, $params, $hosts) { | ||
352 | foreach ($hosts as $i => $host) { | ||
353 | $hosts[$i] = match ($host['scheme']) { | ||
354 | 'tcp' => $host['host'].':'.$host['port'], | ||
355 | 'tls' => 'tls://'.$host['host'].':'.$host['port'], | ||
356 | default => $host['path'], | ||
357 | }; | ||
358 | } | ||
359 | |||
360 | try { | ||
361 | $redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent'], $params['auth'] ?? '', ...\defined('Redis::SCAN_PREFIX') ? [$params['ssl'] ?? null] : []); | ||
362 | } catch (\RedisClusterException $e) { | ||
363 | throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); | ||
364 | } | ||
365 | |||
366 | if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { | ||
367 | $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); | ||
368 | } | ||
369 | $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, match ($params['failover']) { | ||
370 | 'error' => \RedisCluster::FAILOVER_ERROR, | ||
371 | 'distribute' => \RedisCluster::FAILOVER_DISTRIBUTE, | ||
372 | 'slaves' => \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES, | ||
373 | 'none' => \RedisCluster::FAILOVER_NONE, | ||
374 | }); | ||
375 | |||
376 | return $redis; | ||
377 | }; | ||
378 | |||
379 | $redis = $params['lazy'] ? RedisClusterProxy::createLazyProxy($initializer) : $initializer(); | ||
380 | } elseif (is_a($class, \Predis\ClientInterface::class, true)) { | ||
381 | if ($params['redis_cluster']) { | ||
382 | $params['cluster'] = 'redis'; | ||
383 | } elseif (isset($params['redis_sentinel'])) { | ||
384 | $params['replication'] = 'sentinel'; | ||
385 | $params['service'] = $params['redis_sentinel']; | ||
386 | } | ||
387 | $params += ['parameters' => []]; | ||
388 | $params['parameters'] += [ | ||
389 | 'persistent' => $params['persistent'], | ||
390 | 'timeout' => $params['timeout'], | ||
391 | 'read_write_timeout' => $params['read_timeout'], | ||
392 | 'tcp_nodelay' => true, | ||
393 | ]; | ||
394 | if ($params['dbindex']) { | ||
395 | $params['parameters']['database'] = $params['dbindex']; | ||
396 | } | ||
397 | if (null !== $auth) { | ||
398 | if (\is_array($auth)) { | ||
399 | // ACL | ||
400 | $params['parameters']['username'] = $auth[0]; | ||
401 | $params['parameters']['password'] = $auth[1]; | ||
402 | } else { | ||
403 | $params['parameters']['password'] = $auth; | ||
404 | } | ||
405 | } | ||
406 | |||
407 | if (isset($params['ssl'])) { | ||
408 | foreach ($hosts as $i => $host) { | ||
409 | $hosts[$i]['ssl'] ??= $params['ssl']; | ||
410 | } | ||
411 | } | ||
412 | |||
413 | if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) { | ||
414 | $hosts = $hosts[0]; | ||
415 | } elseif (\in_array($params['failover'], ['slaves', 'distribute'], true) && !isset($params['replication'])) { | ||
416 | $params['replication'] = true; | ||
417 | $hosts[0] += ['alias' => 'master']; | ||
418 | } | ||
419 | $params['exceptions'] = false; | ||
420 | |||
421 | $redis = new $class($hosts, array_diff_key($params, self::$defaultConnectionOptions)); | ||
422 | if (isset($params['redis_sentinel'])) { | ||
423 | $redis->getConnection()->setSentinelTimeout($params['timeout']); | ||
424 | } | ||
425 | } elseif (class_exists($class, false)) { | ||
426 | throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class)); | ||
427 | } else { | ||
428 | throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); | ||
429 | } | ||
430 | |||
431 | return $redis; | ||
432 | } | ||
433 | |||
434 | protected function doFetch(array $ids): iterable | ||
435 | { | ||
436 | if (!$ids) { | ||
437 | return []; | ||
438 | } | ||
439 | |||
440 | $result = []; | ||
441 | |||
442 | if ($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) { | ||
443 | $values = $this->pipeline(function () use ($ids) { | ||
444 | foreach ($ids as $id) { | ||
445 | yield 'get' => [$id]; | ||
446 | } | ||
447 | }); | ||
448 | } else { | ||
449 | $values = $this->redis->mget($ids); | ||
450 | |||
451 | if (!\is_array($values) || \count($values) !== \count($ids)) { | ||
452 | return []; | ||
453 | } | ||
454 | |||
455 | $values = array_combine($ids, $values); | ||
456 | } | ||
457 | |||
458 | foreach ($values as $id => $v) { | ||
459 | if ($v) { | ||
460 | $result[$id] = $this->marshaller->unmarshall($v); | ||
461 | } | ||
462 | } | ||
463 | |||
464 | return $result; | ||
465 | } | ||
466 | |||
467 | protected function doHave(string $id): bool | ||
468 | { | ||
469 | return (bool) $this->redis->exists($id); | ||
470 | } | ||
471 | |||
472 | protected function doClear(string $namespace): bool | ||
473 | { | ||
474 | if ($this->redis instanceof \Predis\ClientInterface) { | ||
475 | $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; | ||
476 | $prefixLen = \strlen($prefix ?? ''); | ||
477 | } | ||
478 | |||
479 | $cleared = true; | ||
480 | $hosts = $this->getHosts(); | ||
481 | $host = reset($hosts); | ||
482 | if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { | ||
483 | // Predis supports info command only on the master in replication environments | ||
484 | $hosts = [$host->getClientFor('master')]; | ||
485 | } | ||
486 | |||
487 | foreach ($hosts as $host) { | ||
488 | if (!isset($namespace[0])) { | ||
489 | $cleared = $host->flushDb() && $cleared; | ||
490 | continue; | ||
491 | } | ||
492 | |||
493 | $info = $host->info('Server'); | ||
494 | $info = !$info instanceof ErrorInterface ? $info['Server'] ?? $info : ['redis_version' => '2.0']; | ||
495 | |||
496 | if ($host instanceof Relay) { | ||
497 | $prefix = Relay::SCAN_PREFIX & $host->getOption(Relay::OPT_SCAN) ? '' : $host->getOption(Relay::OPT_PREFIX); | ||
498 | $prefixLen = \strlen($host->getOption(Relay::OPT_PREFIX) ?? ''); | ||
499 | } elseif (!$host instanceof \Predis\ClientInterface) { | ||
500 | $prefix = \defined('Redis::SCAN_PREFIX') && (\Redis::SCAN_PREFIX & $host->getOption(\Redis::OPT_SCAN)) ? '' : $host->getOption(\Redis::OPT_PREFIX); | ||
501 | $prefixLen = \strlen($host->getOption(\Redis::OPT_PREFIX) ?? ''); | ||
502 | } | ||
503 | $pattern = $prefix.$namespace.'*'; | ||
504 | |||
505 | if (!version_compare($info['redis_version'], '2.8', '>=')) { | ||
506 | // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS | ||
507 | // can hang your server when it is executed against large databases (millions of items). | ||
508 | // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above. | ||
509 | $unlink = version_compare($info['redis_version'], '4.0', '>=') ? 'UNLINK' : 'DEL'; | ||
510 | $args = $this->redis instanceof \Predis\ClientInterface ? [0, $pattern] : [[$pattern], 0]; | ||
511 | $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]) for i=1,#keys,5000 do redis.call('$unlink',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $args[0], $args[1]) && $cleared; | ||
512 | continue; | ||
513 | } | ||
514 | |||
515 | $cursor = null; | ||
516 | do { | ||
517 | $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000); | ||
518 | if (isset($keys[1]) && \is_array($keys[1])) { | ||
519 | $cursor = $keys[0]; | ||
520 | $keys = $keys[1]; | ||
521 | } | ||
522 | if ($keys) { | ||
523 | if ($prefixLen) { | ||
524 | foreach ($keys as $i => $key) { | ||
525 | $keys[$i] = substr($key, $prefixLen); | ||
526 | } | ||
527 | } | ||
528 | $this->doDelete($keys); | ||
529 | } | ||
530 | } while ($cursor); | ||
531 | } | ||
532 | |||
533 | return $cleared; | ||
534 | } | ||
535 | |||
536 | protected function doDelete(array $ids): bool | ||
537 | { | ||
538 | if (!$ids) { | ||
539 | return true; | ||
540 | } | ||
541 | |||
542 | if ($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) { | ||
543 | static $del; | ||
544 | $del ??= (class_exists(UNLINK::class) ? 'unlink' : 'del'); | ||
545 | |||
546 | $this->pipeline(function () use ($ids, $del) { | ||
547 | foreach ($ids as $id) { | ||
548 | yield $del => [$id]; | ||
549 | } | ||
550 | })->rewind(); | ||
551 | } else { | ||
552 | static $unlink = true; | ||
553 | |||
554 | if ($unlink) { | ||
555 | try { | ||
556 | $unlink = false !== $this->redis->unlink($ids); | ||
557 | } catch (\Throwable) { | ||
558 | $unlink = false; | ||
559 | } | ||
560 | } | ||
561 | |||
562 | if (!$unlink) { | ||
563 | $this->redis->del($ids); | ||
564 | } | ||
565 | } | ||
566 | |||
567 | return true; | ||
568 | } | ||
569 | |||
570 | protected function doSave(array $values, int $lifetime): array|bool | ||
571 | { | ||
572 | if (!$values = $this->marshaller->marshall($values, $failed)) { | ||
573 | return $failed; | ||
574 | } | ||
575 | |||
576 | $results = $this->pipeline(function () use ($values, $lifetime) { | ||
577 | foreach ($values as $id => $value) { | ||
578 | if (0 >= $lifetime) { | ||
579 | yield 'set' => [$id, $value]; | ||
580 | } else { | ||
581 | yield 'setEx' => [$id, $lifetime, $value]; | ||
582 | } | ||
583 | } | ||
584 | }); | ||
585 | |||
586 | foreach ($results as $id => $result) { | ||
587 | if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { | ||
588 | $failed[] = $id; | ||
589 | } | ||
590 | } | ||
591 | |||
592 | return $failed; | ||
593 | } | ||
594 | |||
595 | private function pipeline(\Closure $generator, ?object $redis = null): \Generator | ||
596 | { | ||
597 | $ids = []; | ||
598 | $redis ??= $this->redis; | ||
599 | |||
600 | if ($redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && ($redis->getConnection() instanceof RedisCluster || $redis->getConnection() instanceof Predis2RedisCluster))) { | ||
601 | // phpredis & predis don't support pipelining with RedisCluster | ||
602 | // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining | ||
603 | // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 | ||
604 | $results = []; | ||
605 | foreach ($generator() as $command => $args) { | ||
606 | $results[] = $redis->{$command}(...$args); | ||
607 | $ids[] = 'eval' === $command ? ($redis instanceof \Predis\ClientInterface ? $args[2] : $args[1][0]) : $args[0]; | ||
608 | } | ||
609 | } elseif ($redis instanceof \Predis\ClientInterface) { | ||
610 | $results = $redis->pipeline(static function ($redis) use ($generator, &$ids) { | ||
611 | foreach ($generator() as $command => $args) { | ||
612 | $redis->{$command}(...$args); | ||
613 | $ids[] = 'eval' === $command ? $args[2] : $args[0]; | ||
614 | } | ||
615 | }); | ||
616 | } elseif ($redis instanceof \RedisArray) { | ||
617 | $connections = $results = $ids = []; | ||
618 | foreach ($generator() as $command => $args) { | ||
619 | $id = 'eval' === $command ? $args[1][0] : $args[0]; | ||
620 | if (!isset($connections[$h = $redis->_target($id)])) { | ||
621 | $connections[$h] = [$redis->_instance($h), -1]; | ||
622 | $connections[$h][0]->multi(\Redis::PIPELINE); | ||
623 | } | ||
624 | $connections[$h][0]->{$command}(...$args); | ||
625 | $results[] = [$h, ++$connections[$h][1]]; | ||
626 | $ids[] = $id; | ||
627 | } | ||
628 | foreach ($connections as $h => $c) { | ||
629 | $connections[$h] = $c[0]->exec(); | ||
630 | } | ||
631 | foreach ($results as $k => [$h, $c]) { | ||
632 | $results[$k] = $connections[$h][$c]; | ||
633 | } | ||
634 | } else { | ||
635 | $redis->multi($redis instanceof Relay ? Relay::PIPELINE : \Redis::PIPELINE); | ||
636 | foreach ($generator() as $command => $args) { | ||
637 | $redis->{$command}(...$args); | ||
638 | $ids[] = 'eval' === $command ? $args[1][0] : $args[0]; | ||
639 | } | ||
640 | $results = $redis->exec(); | ||
641 | } | ||
642 | |||
643 | if (!$redis instanceof \Predis\ClientInterface && 'eval' === $command && $redis->getLastError()) { | ||
644 | $e = $redis instanceof Relay ? new \Relay\Exception($redis->getLastError()) : new \RedisException($redis->getLastError()); | ||
645 | $results = array_map(fn ($v) => false === $v ? $e : $v, (array) $results); | ||
646 | } | ||
647 | |||
648 | if (\is_bool($results)) { | ||
649 | return; | ||
650 | } | ||
651 | |||
652 | foreach ($ids as $k => $id) { | ||
653 | yield $id => $results[$k]; | ||
654 | } | ||
655 | } | ||
656 | |||
657 | private function getHosts(): array | ||
658 | { | ||
659 | $hosts = [$this->redis]; | ||
660 | if ($this->redis instanceof \Predis\ClientInterface) { | ||
661 | $connection = $this->redis->getConnection(); | ||
662 | if (($connection instanceof ClusterInterface || $connection instanceof Predis2ClusterInterface) && $connection instanceof \Traversable) { | ||
663 | $hosts = []; | ||
664 | foreach ($connection as $c) { | ||
665 | $hosts[] = new \Predis\Client($c); | ||
666 | } | ||
667 | } | ||
668 | } elseif ($this->redis instanceof \RedisArray) { | ||
669 | $hosts = []; | ||
670 | foreach ($this->redis->_hosts() as $host) { | ||
671 | $hosts[] = $this->redis->_instance($host); | ||
672 | } | ||
673 | } elseif ($this->redis instanceof \RedisCluster) { | ||
674 | $hosts = []; | ||
675 | foreach ($this->redis->_masters() as $host) { | ||
676 | $hosts[] = new RedisClusterNodeProxy($host, $this->redis); | ||
677 | } | ||
678 | } | ||
679 | |||
680 | return $hosts; | ||
681 | } | ||
682 | } | ||
diff --git a/vendor/symfony/cache/Traits/RelayProxy.php b/vendor/symfony/cache/Traits/RelayProxy.php new file mode 100644 index 0000000..96d7d19 --- /dev/null +++ b/vendor/symfony/cache/Traits/RelayProxy.php | |||
@@ -0,0 +1,1319 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | use Symfony\Component\VarExporter\LazyObjectInterface; | ||
15 | use Symfony\Component\VarExporter\LazyProxyTrait; | ||
16 | use Symfony\Contracts\Service\ResetInterface; | ||
17 | |||
18 | // Help opcache.preload discover always-needed symbols | ||
19 | class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); | ||
20 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); | ||
21 | class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); | ||
22 | |||
23 | /** | ||
24 | * @internal | ||
25 | */ | ||
26 | class RelayProxy extends \Relay\Relay implements ResetInterface, LazyObjectInterface | ||
27 | { | ||
28 | use LazyProxyTrait { | ||
29 | resetLazyObject as reset; | ||
30 | } | ||
31 | use RelayProxyTrait; | ||
32 | |||
33 | private const LAZY_OBJECT_PROPERTY_SCOPES = []; | ||
34 | |||
35 | public function __construct($host = null, $port = 6379, $connect_timeout = 0.0, $command_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0) | ||
36 | { | ||
37 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->__construct(...\func_get_args()); | ||
38 | } | ||
39 | |||
40 | public function connect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool | ||
41 | { | ||
42 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->connect(...\func_get_args()); | ||
43 | } | ||
44 | |||
45 | public function pconnect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool | ||
46 | { | ||
47 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pconnect(...\func_get_args()); | ||
48 | } | ||
49 | |||
50 | public function close(): bool | ||
51 | { | ||
52 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->close(...\func_get_args()); | ||
53 | } | ||
54 | |||
55 | public function pclose(): bool | ||
56 | { | ||
57 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pclose(...\func_get_args()); | ||
58 | } | ||
59 | |||
60 | public function listen($callback): bool | ||
61 | { | ||
62 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->listen(...\func_get_args()); | ||
63 | } | ||
64 | |||
65 | public function onFlushed($callback): bool | ||
66 | { | ||
67 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->onFlushed(...\func_get_args()); | ||
68 | } | ||
69 | |||
70 | public function onInvalidated($callback, $pattern = null): bool | ||
71 | { | ||
72 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->onInvalidated(...\func_get_args()); | ||
73 | } | ||
74 | |||
75 | public function dispatchEvents(): false|int | ||
76 | { | ||
77 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dispatchEvents(...\func_get_args()); | ||
78 | } | ||
79 | |||
80 | public function getOption($option): mixed | ||
81 | { | ||
82 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getOption(...\func_get_args()); | ||
83 | } | ||
84 | |||
85 | public function option($option, $value = null): mixed | ||
86 | { | ||
87 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->option(...\func_get_args()); | ||
88 | } | ||
89 | |||
90 | public function setOption($option, $value): bool | ||
91 | { | ||
92 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setOption(...\func_get_args()); | ||
93 | } | ||
94 | |||
95 | public function addIgnorePatterns(...$pattern): int | ||
96 | { | ||
97 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->addIgnorePatterns(...\func_get_args()); | ||
98 | } | ||
99 | |||
100 | public function addAllowPatterns(...$pattern): int | ||
101 | { | ||
102 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->addAllowPatterns(...\func_get_args()); | ||
103 | } | ||
104 | |||
105 | public function getTimeout(): false|float | ||
106 | { | ||
107 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getTimeout(...\func_get_args()); | ||
108 | } | ||
109 | |||
110 | public function timeout(): false|float | ||
111 | { | ||
112 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->timeout(...\func_get_args()); | ||
113 | } | ||
114 | |||
115 | public function getReadTimeout(): false|float | ||
116 | { | ||
117 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getReadTimeout(...\func_get_args()); | ||
118 | } | ||
119 | |||
120 | public function readTimeout(): false|float | ||
121 | { | ||
122 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->readTimeout(...\func_get_args()); | ||
123 | } | ||
124 | |||
125 | public function getBytes(): array | ||
126 | { | ||
127 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getBytes(...\func_get_args()); | ||
128 | } | ||
129 | |||
130 | public function bytes(): array | ||
131 | { | ||
132 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bytes(...\func_get_args()); | ||
133 | } | ||
134 | |||
135 | public function getHost(): false|string | ||
136 | { | ||
137 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getHost(...\func_get_args()); | ||
138 | } | ||
139 | |||
140 | public function isConnected(): bool | ||
141 | { | ||
142 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->isConnected(...\func_get_args()); | ||
143 | } | ||
144 | |||
145 | public function getPort(): false|int | ||
146 | { | ||
147 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPort(...\func_get_args()); | ||
148 | } | ||
149 | |||
150 | public function getAuth(): mixed | ||
151 | { | ||
152 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getAuth(...\func_get_args()); | ||
153 | } | ||
154 | |||
155 | public function getDbNum(): mixed | ||
156 | { | ||
157 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getDbNum(...\func_get_args()); | ||
158 | } | ||
159 | |||
160 | public function _serialize($value): mixed | ||
161 | { | ||
162 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_serialize(...\func_get_args()); | ||
163 | } | ||
164 | |||
165 | public function _unserialize($value): mixed | ||
166 | { | ||
167 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unserialize(...\func_get_args()); | ||
168 | } | ||
169 | |||
170 | public function _compress($value): string | ||
171 | { | ||
172 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_compress(...\func_get_args()); | ||
173 | } | ||
174 | |||
175 | public function _uncompress($value): string | ||
176 | { | ||
177 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_uncompress(...\func_get_args()); | ||
178 | } | ||
179 | |||
180 | public function _pack($value): string | ||
181 | { | ||
182 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_pack(...\func_get_args()); | ||
183 | } | ||
184 | |||
185 | public function _unpack($value): mixed | ||
186 | { | ||
187 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_unpack(...\func_get_args()); | ||
188 | } | ||
189 | |||
190 | public function _prefix($value): string | ||
191 | { | ||
192 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_prefix(...\func_get_args()); | ||
193 | } | ||
194 | |||
195 | public function getLastError(): ?string | ||
196 | { | ||
197 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getLastError(...\func_get_args()); | ||
198 | } | ||
199 | |||
200 | public function clearLastError(): bool | ||
201 | { | ||
202 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearLastError(...\func_get_args()); | ||
203 | } | ||
204 | |||
205 | public function endpointId(): false|string | ||
206 | { | ||
207 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->endpointId(...\func_get_args()); | ||
208 | } | ||
209 | |||
210 | public function getPersistentID(): false|string | ||
211 | { | ||
212 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getPersistentID(...\func_get_args()); | ||
213 | } | ||
214 | |||
215 | public function socketId(): false|string | ||
216 | { | ||
217 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->socketId(...\func_get_args()); | ||
218 | } | ||
219 | |||
220 | public function rawCommand($cmd, ...$args): mixed | ||
221 | { | ||
222 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rawCommand(...\func_get_args()); | ||
223 | } | ||
224 | |||
225 | public function select($db): \Relay\Relay|bool | ||
226 | { | ||
227 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->select(...\func_get_args()); | ||
228 | } | ||
229 | |||
230 | public function auth(#[\SensitiveParameter] $auth): bool | ||
231 | { | ||
232 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->auth(...\func_get_args()); | ||
233 | } | ||
234 | |||
235 | public function info(...$sections): \Relay\Relay|array|false | ||
236 | { | ||
237 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->info(...\func_get_args()); | ||
238 | } | ||
239 | |||
240 | public function flushdb($sync = null): \Relay\Relay|bool | ||
241 | { | ||
242 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushdb(...\func_get_args()); | ||
243 | } | ||
244 | |||
245 | public function flushall($sync = null): \Relay\Relay|bool | ||
246 | { | ||
247 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->flushall(...\func_get_args()); | ||
248 | } | ||
249 | |||
250 | public function fcall($name, $keys = [], $argv = [], $handler = null): mixed | ||
251 | { | ||
252 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall(...\func_get_args()); | ||
253 | } | ||
254 | |||
255 | public function fcall_ro($name, $keys = [], $argv = [], $handler = null): mixed | ||
256 | { | ||
257 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->fcall_ro(...\func_get_args()); | ||
258 | } | ||
259 | |||
260 | public function function($op, ...$args): mixed | ||
261 | { | ||
262 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->function(...\func_get_args()); | ||
263 | } | ||
264 | |||
265 | public function dbsize(): \Relay\Relay|false|int | ||
266 | { | ||
267 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dbsize(...\func_get_args()); | ||
268 | } | ||
269 | |||
270 | public function dump($key): \Relay\Relay|false|string | ||
271 | { | ||
272 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->dump(...\func_get_args()); | ||
273 | } | ||
274 | |||
275 | public function replicaof($host = null, $port = 0): \Relay\Relay|bool | ||
276 | { | ||
277 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->replicaof(...\func_get_args()); | ||
278 | } | ||
279 | |||
280 | public function waitaof($numlocal, $numremote, $timeout): \Relay\Relay|array|false | ||
281 | { | ||
282 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args()); | ||
283 | } | ||
284 | |||
285 | public function restore($key, $ttl, $value, $options = null): \Relay\Relay|bool | ||
286 | { | ||
287 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args()); | ||
288 | } | ||
289 | |||
290 | public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Relay\Relay|bool | ||
291 | { | ||
292 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->migrate(...\func_get_args()); | ||
293 | } | ||
294 | |||
295 | public function echo($arg): \Relay\Relay|bool|string | ||
296 | { | ||
297 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->echo(...\func_get_args()); | ||
298 | } | ||
299 | |||
300 | public function ping($arg = null): \Relay\Relay|bool|string | ||
301 | { | ||
302 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ping(...\func_get_args()); | ||
303 | } | ||
304 | |||
305 | public function idleTime(): \Relay\Relay|false|int | ||
306 | { | ||
307 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->idleTime(...\func_get_args()); | ||
308 | } | ||
309 | |||
310 | public function randomkey(): \Relay\Relay|bool|null|string | ||
311 | { | ||
312 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->randomkey(...\func_get_args()); | ||
313 | } | ||
314 | |||
315 | public function time(): \Relay\Relay|array|false | ||
316 | { | ||
317 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->time(...\func_get_args()); | ||
318 | } | ||
319 | |||
320 | public function bgrewriteaof(): \Relay\Relay|bool | ||
321 | { | ||
322 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgrewriteaof(...\func_get_args()); | ||
323 | } | ||
324 | |||
325 | public function lastsave(): \Relay\Relay|false|int | ||
326 | { | ||
327 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lastsave(...\func_get_args()); | ||
328 | } | ||
329 | |||
330 | public function lcs($key1, $key2, $options = null): mixed | ||
331 | { | ||
332 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lcs(...\func_get_args()); | ||
333 | } | ||
334 | |||
335 | public function bgsave($schedule = false): \Relay\Relay|bool | ||
336 | { | ||
337 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bgsave(...\func_get_args()); | ||
338 | } | ||
339 | |||
340 | public function save(): \Relay\Relay|bool | ||
341 | { | ||
342 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->save(...\func_get_args()); | ||
343 | } | ||
344 | |||
345 | public function role(): \Relay\Relay|array|false | ||
346 | { | ||
347 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->role(...\func_get_args()); | ||
348 | } | ||
349 | |||
350 | public function ttl($key): \Relay\Relay|false|int | ||
351 | { | ||
352 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ttl(...\func_get_args()); | ||
353 | } | ||
354 | |||
355 | public function pttl($key): \Relay\Relay|false|int | ||
356 | { | ||
357 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pttl(...\func_get_args()); | ||
358 | } | ||
359 | |||
360 | public function exists(...$keys): \Relay\Relay|bool|int | ||
361 | { | ||
362 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exists(...\func_get_args()); | ||
363 | } | ||
364 | |||
365 | public function eval($script, $args = [], $num_keys = 0): mixed | ||
366 | { | ||
367 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval(...\func_get_args()); | ||
368 | } | ||
369 | |||
370 | public function eval_ro($script, $args = [], $num_keys = 0): mixed | ||
371 | { | ||
372 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->eval_ro(...\func_get_args()); | ||
373 | } | ||
374 | |||
375 | public function evalsha($sha, $args = [], $num_keys = 0): mixed | ||
376 | { | ||
377 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha(...\func_get_args()); | ||
378 | } | ||
379 | |||
380 | public function evalsha_ro($sha, $args = [], $num_keys = 0): mixed | ||
381 | { | ||
382 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->evalsha_ro(...\func_get_args()); | ||
383 | } | ||
384 | |||
385 | public function client($operation, ...$args): mixed | ||
386 | { | ||
387 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->client(...\func_get_args()); | ||
388 | } | ||
389 | |||
390 | public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Relay\Relay|false|int | ||
391 | { | ||
392 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geoadd(...\func_get_args()); | ||
393 | } | ||
394 | |||
395 | public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float | ||
396 | { | ||
397 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geodist(...\func_get_args()); | ||
398 | } | ||
399 | |||
400 | public function geohash($key, $member, ...$other_members): \Relay\Relay|array|false | ||
401 | { | ||
402 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geohash(...\func_get_args()); | ||
403 | } | ||
404 | |||
405 | public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
406 | { | ||
407 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius(...\func_get_args()); | ||
408 | } | ||
409 | |||
410 | public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed | ||
411 | { | ||
412 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember(...\func_get_args()); | ||
413 | } | ||
414 | |||
415 | public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed | ||
416 | { | ||
417 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadiusbymember_ro(...\func_get_args()); | ||
418 | } | ||
419 | |||
420 | public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed | ||
421 | { | ||
422 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->georadius_ro(...\func_get_args()); | ||
423 | } | ||
424 | |||
425 | public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array | ||
426 | { | ||
427 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearch(...\func_get_args()); | ||
428 | } | ||
429 | |||
430 | public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Relay\Relay|false|int | ||
431 | { | ||
432 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geosearchstore(...\func_get_args()); | ||
433 | } | ||
434 | |||
435 | public function get($key): mixed | ||
436 | { | ||
437 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->get(...\func_get_args()); | ||
438 | } | ||
439 | |||
440 | public function getset($key, $value): mixed | ||
441 | { | ||
442 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getset(...\func_get_args()); | ||
443 | } | ||
444 | |||
445 | public function getrange($key, $start, $end): \Relay\Relay|false|string | ||
446 | { | ||
447 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getrange(...\func_get_args()); | ||
448 | } | ||
449 | |||
450 | public function setrange($key, $start, $value): \Relay\Relay|false|int | ||
451 | { | ||
452 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setrange(...\func_get_args()); | ||
453 | } | ||
454 | |||
455 | public function getbit($key, $pos): \Relay\Relay|false|int | ||
456 | { | ||
457 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getbit(...\func_get_args()); | ||
458 | } | ||
459 | |||
460 | public function bitcount($key, $start = 0, $end = -1, $by_bit = false): \Relay\Relay|false|int | ||
461 | { | ||
462 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args()); | ||
463 | } | ||
464 | |||
465 | public function bitfield($key, ...$args): \Relay\Relay|array|false | ||
466 | { | ||
467 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitfield(...\func_get_args()); | ||
468 | } | ||
469 | |||
470 | public function config($operation, $key = null, $value = null): \Relay\Relay|array|bool | ||
471 | { | ||
472 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args()); | ||
473 | } | ||
474 | |||
475 | public function command(...$args): \Relay\Relay|array|false|int | ||
476 | { | ||
477 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->command(...\func_get_args()); | ||
478 | } | ||
479 | |||
480 | public function bitop($operation, $dstkey, $srckey, ...$other_keys): \Relay\Relay|false|int | ||
481 | { | ||
482 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitop(...\func_get_args()); | ||
483 | } | ||
484 | |||
485 | public function bitpos($key, $bit, $start = null, $end = null, $bybit = false): \Relay\Relay|false|int | ||
486 | { | ||
487 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitpos(...\func_get_args()); | ||
488 | } | ||
489 | |||
490 | public function setbit($key, $pos, $val): \Relay\Relay|false|int | ||
491 | { | ||
492 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setbit(...\func_get_args()); | ||
493 | } | ||
494 | |||
495 | public function acl($cmd, ...$args): mixed | ||
496 | { | ||
497 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->acl(...\func_get_args()); | ||
498 | } | ||
499 | |||
500 | public function append($key, $value): \Relay\Relay|false|int | ||
501 | { | ||
502 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->append(...\func_get_args()); | ||
503 | } | ||
504 | |||
505 | public function set($key, $value, $options = null): mixed | ||
506 | { | ||
507 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->set(...\func_get_args()); | ||
508 | } | ||
509 | |||
510 | public function getex($key, $options = null): mixed | ||
511 | { | ||
512 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getex(...\func_get_args()); | ||
513 | } | ||
514 | |||
515 | public function getdel($key): mixed | ||
516 | { | ||
517 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getdel(...\func_get_args()); | ||
518 | } | ||
519 | |||
520 | public function setex($key, $seconds, $value): \Relay\Relay|bool | ||
521 | { | ||
522 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setex(...\func_get_args()); | ||
523 | } | ||
524 | |||
525 | public function pfadd($key, $elements): \Relay\Relay|false|int | ||
526 | { | ||
527 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfadd(...\func_get_args()); | ||
528 | } | ||
529 | |||
530 | public function pfcount($key): \Relay\Relay|false|int | ||
531 | { | ||
532 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfcount(...\func_get_args()); | ||
533 | } | ||
534 | |||
535 | public function pfmerge($dst, $srckeys): \Relay\Relay|bool | ||
536 | { | ||
537 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pfmerge(...\func_get_args()); | ||
538 | } | ||
539 | |||
540 | public function psetex($key, $milliseconds, $value): \Relay\Relay|bool | ||
541 | { | ||
542 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psetex(...\func_get_args()); | ||
543 | } | ||
544 | |||
545 | public function publish($channel, $message): \Relay\Relay|false|int | ||
546 | { | ||
547 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->publish(...\func_get_args()); | ||
548 | } | ||
549 | |||
550 | public function pubsub($operation, ...$args): mixed | ||
551 | { | ||
552 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pubsub(...\func_get_args()); | ||
553 | } | ||
554 | |||
555 | public function spublish($channel, $message): \Relay\Relay|false|int | ||
556 | { | ||
557 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spublish(...\func_get_args()); | ||
558 | } | ||
559 | |||
560 | public function setnx($key, $value): \Relay\Relay|bool | ||
561 | { | ||
562 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->setnx(...\func_get_args()); | ||
563 | } | ||
564 | |||
565 | public function mget($keys): \Relay\Relay|array|false | ||
566 | { | ||
567 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mget(...\func_get_args()); | ||
568 | } | ||
569 | |||
570 | public function move($key, $db): \Relay\Relay|false|int | ||
571 | { | ||
572 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->move(...\func_get_args()); | ||
573 | } | ||
574 | |||
575 | public function mset($kvals): \Relay\Relay|bool | ||
576 | { | ||
577 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->mset(...\func_get_args()); | ||
578 | } | ||
579 | |||
580 | public function msetnx($kvals): \Relay\Relay|bool | ||
581 | { | ||
582 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->msetnx(...\func_get_args()); | ||
583 | } | ||
584 | |||
585 | public function rename($key, $newkey): \Relay\Relay|bool | ||
586 | { | ||
587 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rename(...\func_get_args()); | ||
588 | } | ||
589 | |||
590 | public function renamenx($key, $newkey): \Relay\Relay|bool | ||
591 | { | ||
592 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->renamenx(...\func_get_args()); | ||
593 | } | ||
594 | |||
595 | public function del(...$keys): \Relay\Relay|bool|int | ||
596 | { | ||
597 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->del(...\func_get_args()); | ||
598 | } | ||
599 | |||
600 | public function unlink(...$keys): \Relay\Relay|false|int | ||
601 | { | ||
602 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unlink(...\func_get_args()); | ||
603 | } | ||
604 | |||
605 | public function expire($key, $seconds, $mode = null): \Relay\Relay|bool | ||
606 | { | ||
607 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expire(...\func_get_args()); | ||
608 | } | ||
609 | |||
610 | public function pexpire($key, $milliseconds): \Relay\Relay|bool | ||
611 | { | ||
612 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpire(...\func_get_args()); | ||
613 | } | ||
614 | |||
615 | public function expireat($key, $timestamp): \Relay\Relay|bool | ||
616 | { | ||
617 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expireat(...\func_get_args()); | ||
618 | } | ||
619 | |||
620 | public function expiretime($key): \Relay\Relay|false|int | ||
621 | { | ||
622 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->expiretime(...\func_get_args()); | ||
623 | } | ||
624 | |||
625 | public function pexpireat($key, $timestamp_ms): \Relay\Relay|bool | ||
626 | { | ||
627 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpireat(...\func_get_args()); | ||
628 | } | ||
629 | |||
630 | public function pexpiretime($key): \Relay\Relay|false|int | ||
631 | { | ||
632 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pexpiretime(...\func_get_args()); | ||
633 | } | ||
634 | |||
635 | public function persist($key): \Relay\Relay|bool | ||
636 | { | ||
637 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->persist(...\func_get_args()); | ||
638 | } | ||
639 | |||
640 | public function type($key): \Relay\Relay|bool|int|string | ||
641 | { | ||
642 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->type(...\func_get_args()); | ||
643 | } | ||
644 | |||
645 | public function lmove($srckey, $dstkey, $srcpos, $dstpos): \Relay\Relay|false|null|string | ||
646 | { | ||
647 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmove(...\func_get_args()); | ||
648 | } | ||
649 | |||
650 | public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): \Relay\Relay|false|null|string | ||
651 | { | ||
652 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmove(...\func_get_args()); | ||
653 | } | ||
654 | |||
655 | public function lrange($key, $start, $stop): \Relay\Relay|array|false | ||
656 | { | ||
657 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrange(...\func_get_args()); | ||
658 | } | ||
659 | |||
660 | public function lpush($key, $mem, ...$mems): \Relay\Relay|false|int | ||
661 | { | ||
662 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpush(...\func_get_args()); | ||
663 | } | ||
664 | |||
665 | public function rpush($key, $mem, ...$mems): \Relay\Relay|false|int | ||
666 | { | ||
667 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpush(...\func_get_args()); | ||
668 | } | ||
669 | |||
670 | public function lpushx($key, $mem, ...$mems): \Relay\Relay|false|int | ||
671 | { | ||
672 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpushx(...\func_get_args()); | ||
673 | } | ||
674 | |||
675 | public function rpushx($key, $mem, ...$mems): \Relay\Relay|false|int | ||
676 | { | ||
677 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpushx(...\func_get_args()); | ||
678 | } | ||
679 | |||
680 | public function lset($key, $index, $mem): \Relay\Relay|bool | ||
681 | { | ||
682 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lset(...\func_get_args()); | ||
683 | } | ||
684 | |||
685 | public function lpop($key, $count = 1): mixed | ||
686 | { | ||
687 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpop(...\func_get_args()); | ||
688 | } | ||
689 | |||
690 | public function lpos($key, $value, $options = null): \Relay\Relay|array|false|int|null | ||
691 | { | ||
692 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lpos(...\func_get_args()); | ||
693 | } | ||
694 | |||
695 | public function rpop($key, $count = 1): mixed | ||
696 | { | ||
697 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpop(...\func_get_args()); | ||
698 | } | ||
699 | |||
700 | public function rpoplpush($source, $dest): mixed | ||
701 | { | ||
702 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->rpoplpush(...\func_get_args()); | ||
703 | } | ||
704 | |||
705 | public function brpoplpush($source, $dest, $timeout): mixed | ||
706 | { | ||
707 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpoplpush(...\func_get_args()); | ||
708 | } | ||
709 | |||
710 | public function blpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null | ||
711 | { | ||
712 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blpop(...\func_get_args()); | ||
713 | } | ||
714 | |||
715 | public function blmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null | ||
716 | { | ||
717 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->blmpop(...\func_get_args()); | ||
718 | } | ||
719 | |||
720 | public function bzmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null | ||
721 | { | ||
722 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzmpop(...\func_get_args()); | ||
723 | } | ||
724 | |||
725 | public function lmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null | ||
726 | { | ||
727 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lmpop(...\func_get_args()); | ||
728 | } | ||
729 | |||
730 | public function zmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null | ||
731 | { | ||
732 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmpop(...\func_get_args()); | ||
733 | } | ||
734 | |||
735 | public function brpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null | ||
736 | { | ||
737 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->brpop(...\func_get_args()); | ||
738 | } | ||
739 | |||
740 | public function bzpopmax($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null | ||
741 | { | ||
742 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmax(...\func_get_args()); | ||
743 | } | ||
744 | |||
745 | public function bzpopmin($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null | ||
746 | { | ||
747 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bzpopmin(...\func_get_args()); | ||
748 | } | ||
749 | |||
750 | public function object($op, $key): mixed | ||
751 | { | ||
752 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->object(...\func_get_args()); | ||
753 | } | ||
754 | |||
755 | public function geopos($key, ...$members): \Relay\Relay|array|false | ||
756 | { | ||
757 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->geopos(...\func_get_args()); | ||
758 | } | ||
759 | |||
760 | public function lrem($key, $mem, $count = 0): \Relay\Relay|false|int | ||
761 | { | ||
762 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lrem(...\func_get_args()); | ||
763 | } | ||
764 | |||
765 | public function lindex($key, $index): mixed | ||
766 | { | ||
767 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->lindex(...\func_get_args()); | ||
768 | } | ||
769 | |||
770 | public function linsert($key, $op, $pivot, $element): \Relay\Relay|false|int | ||
771 | { | ||
772 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->linsert(...\func_get_args()); | ||
773 | } | ||
774 | |||
775 | public function ltrim($key, $start, $end): \Relay\Relay|bool | ||
776 | { | ||
777 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ltrim(...\func_get_args()); | ||
778 | } | ||
779 | |||
780 | public function hget($hash, $member): mixed | ||
781 | { | ||
782 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hget(...\func_get_args()); | ||
783 | } | ||
784 | |||
785 | public function hstrlen($hash, $member): \Relay\Relay|false|int | ||
786 | { | ||
787 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hstrlen(...\func_get_args()); | ||
788 | } | ||
789 | |||
790 | public function hgetall($hash): \Relay\Relay|array|false | ||
791 | { | ||
792 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hgetall(...\func_get_args()); | ||
793 | } | ||
794 | |||
795 | public function hkeys($hash): \Relay\Relay|array|false | ||
796 | { | ||
797 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hkeys(...\func_get_args()); | ||
798 | } | ||
799 | |||
800 | public function hvals($hash): \Relay\Relay|array|false | ||
801 | { | ||
802 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hvals(...\func_get_args()); | ||
803 | } | ||
804 | |||
805 | public function hmget($hash, $members): \Relay\Relay|array|false | ||
806 | { | ||
807 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmget(...\func_get_args()); | ||
808 | } | ||
809 | |||
810 | public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string | ||
811 | { | ||
812 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hrandfield(...\func_get_args()); | ||
813 | } | ||
814 | |||
815 | public function hmset($hash, $members): \Relay\Relay|bool | ||
816 | { | ||
817 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hmset(...\func_get_args()); | ||
818 | } | ||
819 | |||
820 | public function hexists($hash, $member): \Relay\Relay|bool | ||
821 | { | ||
822 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hexists(...\func_get_args()); | ||
823 | } | ||
824 | |||
825 | public function hsetnx($hash, $member, $value): \Relay\Relay|bool | ||
826 | { | ||
827 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hsetnx(...\func_get_args()); | ||
828 | } | ||
829 | |||
830 | public function hset($key, $mem, $val, ...$kvals): \Relay\Relay|false|int | ||
831 | { | ||
832 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hset(...\func_get_args()); | ||
833 | } | ||
834 | |||
835 | public function hdel($key, $mem, ...$mems): \Relay\Relay|false|int | ||
836 | { | ||
837 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hdel(...\func_get_args()); | ||
838 | } | ||
839 | |||
840 | public function hincrby($key, $mem, $value): \Relay\Relay|false|int | ||
841 | { | ||
842 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrby(...\func_get_args()); | ||
843 | } | ||
844 | |||
845 | public function hincrbyfloat($key, $mem, $value): \Relay\Relay|bool|float | ||
846 | { | ||
847 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hincrbyfloat(...\func_get_args()); | ||
848 | } | ||
849 | |||
850 | public function incr($key, $by = 1): \Relay\Relay|false|int | ||
851 | { | ||
852 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incr(...\func_get_args()); | ||
853 | } | ||
854 | |||
855 | public function decr($key, $by = 1): \Relay\Relay|false|int | ||
856 | { | ||
857 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decr(...\func_get_args()); | ||
858 | } | ||
859 | |||
860 | public function incrby($key, $value): \Relay\Relay|false|int | ||
861 | { | ||
862 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrby(...\func_get_args()); | ||
863 | } | ||
864 | |||
865 | public function decrby($key, $value): \Relay\Relay|false|int | ||
866 | { | ||
867 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->decrby(...\func_get_args()); | ||
868 | } | ||
869 | |||
870 | public function incrbyfloat($key, $value): \Relay\Relay|false|float | ||
871 | { | ||
872 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->incrbyfloat(...\func_get_args()); | ||
873 | } | ||
874 | |||
875 | public function sdiff($key, ...$other_keys): \Relay\Relay|array|false | ||
876 | { | ||
877 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiff(...\func_get_args()); | ||
878 | } | ||
879 | |||
880 | public function sdiffstore($key, ...$other_keys): \Relay\Relay|false|int | ||
881 | { | ||
882 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sdiffstore(...\func_get_args()); | ||
883 | } | ||
884 | |||
885 | public function sinter($key, ...$other_keys): \Relay\Relay|array|false | ||
886 | { | ||
887 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinter(...\func_get_args()); | ||
888 | } | ||
889 | |||
890 | public function sintercard($keys, $limit = -1): \Relay\Relay|false|int | ||
891 | { | ||
892 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sintercard(...\func_get_args()); | ||
893 | } | ||
894 | |||
895 | public function sinterstore($key, ...$other_keys): \Relay\Relay|false|int | ||
896 | { | ||
897 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sinterstore(...\func_get_args()); | ||
898 | } | ||
899 | |||
900 | public function sunion($key, ...$other_keys): \Relay\Relay|array|false | ||
901 | { | ||
902 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunion(...\func_get_args()); | ||
903 | } | ||
904 | |||
905 | public function sunionstore($key, ...$other_keys): \Relay\Relay|false|int | ||
906 | { | ||
907 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunionstore(...\func_get_args()); | ||
908 | } | ||
909 | |||
910 | public function subscribe($channels, $callback): bool | ||
911 | { | ||
912 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->subscribe(...\func_get_args()); | ||
913 | } | ||
914 | |||
915 | public function unsubscribe($channels = []): bool | ||
916 | { | ||
917 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unsubscribe(...\func_get_args()); | ||
918 | } | ||
919 | |||
920 | public function psubscribe($patterns, $callback): bool | ||
921 | { | ||
922 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->psubscribe(...\func_get_args()); | ||
923 | } | ||
924 | |||
925 | public function punsubscribe($patterns = []): bool | ||
926 | { | ||
927 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->punsubscribe(...\func_get_args()); | ||
928 | } | ||
929 | |||
930 | public function ssubscribe($channels, $callback): bool | ||
931 | { | ||
932 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->ssubscribe(...\func_get_args()); | ||
933 | } | ||
934 | |||
935 | public function sunsubscribe($channels = []): bool | ||
936 | { | ||
937 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sunsubscribe(...\func_get_args()); | ||
938 | } | ||
939 | |||
940 | public function touch($key_or_array, ...$more_keys): \Relay\Relay|false|int | ||
941 | { | ||
942 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->touch(...\func_get_args()); | ||
943 | } | ||
944 | |||
945 | public function pipeline(): \Relay\Relay|bool | ||
946 | { | ||
947 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->pipeline(...\func_get_args()); | ||
948 | } | ||
949 | |||
950 | public function multi($mode = 0): \Relay\Relay|bool | ||
951 | { | ||
952 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->multi(...\func_get_args()); | ||
953 | } | ||
954 | |||
955 | public function exec(): \Relay\Relay|array|bool | ||
956 | { | ||
957 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->exec(...\func_get_args()); | ||
958 | } | ||
959 | |||
960 | public function wait($replicas, $timeout): \Relay\Relay|false|int | ||
961 | { | ||
962 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->wait(...\func_get_args()); | ||
963 | } | ||
964 | |||
965 | public function watch($key, ...$other_keys): \Relay\Relay|bool | ||
966 | { | ||
967 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->watch(...\func_get_args()); | ||
968 | } | ||
969 | |||
970 | public function unwatch(): \Relay\Relay|bool | ||
971 | { | ||
972 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->unwatch(...\func_get_args()); | ||
973 | } | ||
974 | |||
975 | public function discard(): bool | ||
976 | { | ||
977 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->discard(...\func_get_args()); | ||
978 | } | ||
979 | |||
980 | public function getMode($masked = false): int | ||
981 | { | ||
982 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->getMode(...\func_get_args()); | ||
983 | } | ||
984 | |||
985 | public function clearBytes(): void | ||
986 | { | ||
987 | ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->clearBytes(...\func_get_args()); | ||
988 | } | ||
989 | |||
990 | public function scan(&$iterator, $match = null, $count = 0, $type = null): array|false | ||
991 | { | ||
992 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scan($iterator, ...\array_slice(\func_get_args(), 1)); | ||
993 | } | ||
994 | |||
995 | public function hscan($key, &$iterator, $match = null, $count = 0): array|false | ||
996 | { | ||
997 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
998 | } | ||
999 | |||
1000 | public function sscan($key, &$iterator, $match = null, $count = 0): array|false | ||
1001 | { | ||
1002 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
1003 | } | ||
1004 | |||
1005 | public function zscan($key, &$iterator, $match = null, $count = 0): array|false | ||
1006 | { | ||
1007 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); | ||
1008 | } | ||
1009 | |||
1010 | public function keys($pattern): \Relay\Relay|array|false | ||
1011 | { | ||
1012 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->keys(...\func_get_args()); | ||
1013 | } | ||
1014 | |||
1015 | public function slowlog($operation, ...$extra_args): \Relay\Relay|array|bool|int | ||
1016 | { | ||
1017 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->slowlog(...\func_get_args()); | ||
1018 | } | ||
1019 | |||
1020 | public function smembers($set): \Relay\Relay|array|false | ||
1021 | { | ||
1022 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smembers(...\func_get_args()); | ||
1023 | } | ||
1024 | |||
1025 | public function sismember($set, $member): \Relay\Relay|bool | ||
1026 | { | ||
1027 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sismember(...\func_get_args()); | ||
1028 | } | ||
1029 | |||
1030 | public function smismember($set, ...$members): \Relay\Relay|array|false | ||
1031 | { | ||
1032 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smismember(...\func_get_args()); | ||
1033 | } | ||
1034 | |||
1035 | public function srem($set, $member, ...$members): \Relay\Relay|false|int | ||
1036 | { | ||
1037 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srem(...\func_get_args()); | ||
1038 | } | ||
1039 | |||
1040 | public function sadd($set, $member, ...$members): \Relay\Relay|false|int | ||
1041 | { | ||
1042 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sadd(...\func_get_args()); | ||
1043 | } | ||
1044 | |||
1045 | public function sort($key, $options = []): \Relay\Relay|array|false|int | ||
1046 | { | ||
1047 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort(...\func_get_args()); | ||
1048 | } | ||
1049 | |||
1050 | public function sort_ro($key, $options = []): \Relay\Relay|array|false | ||
1051 | { | ||
1052 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->sort_ro(...\func_get_args()); | ||
1053 | } | ||
1054 | |||
1055 | public function smove($srcset, $dstset, $member): \Relay\Relay|bool | ||
1056 | { | ||
1057 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->smove(...\func_get_args()); | ||
1058 | } | ||
1059 | |||
1060 | public function spop($set, $count = 1): mixed | ||
1061 | { | ||
1062 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->spop(...\func_get_args()); | ||
1063 | } | ||
1064 | |||
1065 | public function srandmember($set, $count = 1): mixed | ||
1066 | { | ||
1067 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->srandmember(...\func_get_args()); | ||
1068 | } | ||
1069 | |||
1070 | public function scard($key): \Relay\Relay|false|int | ||
1071 | { | ||
1072 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->scard(...\func_get_args()); | ||
1073 | } | ||
1074 | |||
1075 | public function script($command, ...$args): mixed | ||
1076 | { | ||
1077 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->script(...\func_get_args()); | ||
1078 | } | ||
1079 | |||
1080 | public function strlen($key): \Relay\Relay|false|int | ||
1081 | { | ||
1082 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->strlen(...\func_get_args()); | ||
1083 | } | ||
1084 | |||
1085 | public function hlen($key): \Relay\Relay|false|int | ||
1086 | { | ||
1087 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->hlen(...\func_get_args()); | ||
1088 | } | ||
1089 | |||
1090 | public function llen($key): \Relay\Relay|false|int | ||
1091 | { | ||
1092 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->llen(...\func_get_args()); | ||
1093 | } | ||
1094 | |||
1095 | public function xack($key, $group, $ids): \Relay\Relay|false|int | ||
1096 | { | ||
1097 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xack(...\func_get_args()); | ||
1098 | } | ||
1099 | |||
1100 | public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string | ||
1101 | { | ||
1102 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xadd(...\func_get_args()); | ||
1103 | } | ||
1104 | |||
1105 | public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Relay\Relay|array|bool | ||
1106 | { | ||
1107 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xclaim(...\func_get_args()); | ||
1108 | } | ||
1109 | |||
1110 | public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Relay\Relay|array|bool | ||
1111 | { | ||
1112 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xautoclaim(...\func_get_args()); | ||
1113 | } | ||
1114 | |||
1115 | public function xlen($key): \Relay\Relay|false|int | ||
1116 | { | ||
1117 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xlen(...\func_get_args()); | ||
1118 | } | ||
1119 | |||
1120 | public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed | ||
1121 | { | ||
1122 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xgroup(...\func_get_args()); | ||
1123 | } | ||
1124 | |||
1125 | public function xdel($key, $ids): \Relay\Relay|false|int | ||
1126 | { | ||
1127 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xdel(...\func_get_args()); | ||
1128 | } | ||
1129 | |||
1130 | public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed | ||
1131 | { | ||
1132 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xinfo(...\func_get_args()); | ||
1133 | } | ||
1134 | |||
1135 | public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null, $idle = 0): \Relay\Relay|array|false | ||
1136 | { | ||
1137 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xpending(...\func_get_args()); | ||
1138 | } | ||
1139 | |||
1140 | public function xrange($key, $start, $end, $count = -1): \Relay\Relay|array|false | ||
1141 | { | ||
1142 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrange(...\func_get_args()); | ||
1143 | } | ||
1144 | |||
1145 | public function xrevrange($key, $end, $start, $count = -1): \Relay\Relay|array|bool | ||
1146 | { | ||
1147 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xrevrange(...\func_get_args()); | ||
1148 | } | ||
1149 | |||
1150 | public function xread($streams, $count = -1, $block = -1): \Relay\Relay|array|bool|null | ||
1151 | { | ||
1152 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xread(...\func_get_args()); | ||
1153 | } | ||
1154 | |||
1155 | public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Relay\Relay|array|bool|null | ||
1156 | { | ||
1157 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xreadgroup(...\func_get_args()); | ||
1158 | } | ||
1159 | |||
1160 | public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Relay\Relay|false|int | ||
1161 | { | ||
1162 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->xtrim(...\func_get_args()); | ||
1163 | } | ||
1164 | |||
1165 | public function zadd($key, ...$args): mixed | ||
1166 | { | ||
1167 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zadd(...\func_get_args()); | ||
1168 | } | ||
1169 | |||
1170 | public function zrandmember($key, $options = null): mixed | ||
1171 | { | ||
1172 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrandmember(...\func_get_args()); | ||
1173 | } | ||
1174 | |||
1175 | public function zrange($key, $start, $end, $options = null): \Relay\Relay|array|false | ||
1176 | { | ||
1177 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrange(...\func_get_args()); | ||
1178 | } | ||
1179 | |||
1180 | public function zrevrange($key, $start, $end, $options = null): \Relay\Relay|array|false | ||
1181 | { | ||
1182 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrange(...\func_get_args()); | ||
1183 | } | ||
1184 | |||
1185 | public function zrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false | ||
1186 | { | ||
1187 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebyscore(...\func_get_args()); | ||
1188 | } | ||
1189 | |||
1190 | public function zrevrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false | ||
1191 | { | ||
1192 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebyscore(...\func_get_args()); | ||
1193 | } | ||
1194 | |||
1195 | public function zrangestore($dst, $src, $start, $end, $options = null): \Relay\Relay|false|int | ||
1196 | { | ||
1197 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangestore(...\func_get_args()); | ||
1198 | } | ||
1199 | |||
1200 | public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \Relay\Relay|array|false | ||
1201 | { | ||
1202 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrangebylex(...\func_get_args()); | ||
1203 | } | ||
1204 | |||
1205 | public function zrevrangebylex($key, $max, $min, $offset = -1, $count = -1): \Relay\Relay|array|false | ||
1206 | { | ||
1207 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrangebylex(...\func_get_args()); | ||
1208 | } | ||
1209 | |||
1210 | public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int | ||
1211 | { | ||
1212 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrank(...\func_get_args()); | ||
1213 | } | ||
1214 | |||
1215 | public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int | ||
1216 | { | ||
1217 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrevrank(...\func_get_args()); | ||
1218 | } | ||
1219 | |||
1220 | public function zrem($key, ...$args): \Relay\Relay|false|int | ||
1221 | { | ||
1222 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zrem(...\func_get_args()); | ||
1223 | } | ||
1224 | |||
1225 | public function zremrangebylex($key, $min, $max): \Relay\Relay|false|int | ||
1226 | { | ||
1227 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebylex(...\func_get_args()); | ||
1228 | } | ||
1229 | |||
1230 | public function zremrangebyrank($key, $start, $end): \Relay\Relay|false|int | ||
1231 | { | ||
1232 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyrank(...\func_get_args()); | ||
1233 | } | ||
1234 | |||
1235 | public function zremrangebyscore($key, $min, $max): \Relay\Relay|false|int | ||
1236 | { | ||
1237 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zremrangebyscore(...\func_get_args()); | ||
1238 | } | ||
1239 | |||
1240 | public function zcard($key): \Relay\Relay|false|int | ||
1241 | { | ||
1242 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcard(...\func_get_args()); | ||
1243 | } | ||
1244 | |||
1245 | public function zcount($key, $min, $max): \Relay\Relay|false|int | ||
1246 | { | ||
1247 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zcount(...\func_get_args()); | ||
1248 | } | ||
1249 | |||
1250 | public function zdiff($keys, $options = null): \Relay\Relay|array|false | ||
1251 | { | ||
1252 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiff(...\func_get_args()); | ||
1253 | } | ||
1254 | |||
1255 | public function zdiffstore($dst, $keys): \Relay\Relay|false|int | ||
1256 | { | ||
1257 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zdiffstore(...\func_get_args()); | ||
1258 | } | ||
1259 | |||
1260 | public function zincrby($key, $score, $mem): \Relay\Relay|false|float | ||
1261 | { | ||
1262 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zincrby(...\func_get_args()); | ||
1263 | } | ||
1264 | |||
1265 | public function zlexcount($key, $min, $max): \Relay\Relay|false|int | ||
1266 | { | ||
1267 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zlexcount(...\func_get_args()); | ||
1268 | } | ||
1269 | |||
1270 | public function zmscore($key, ...$mems): \Relay\Relay|array|false | ||
1271 | { | ||
1272 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zmscore(...\func_get_args()); | ||
1273 | } | ||
1274 | |||
1275 | public function zscore($key, $member): \Relay\Relay|false|float | ||
1276 | { | ||
1277 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zscore(...\func_get_args()); | ||
1278 | } | ||
1279 | |||
1280 | public function zinter($keys, $weights = null, $options = null): \Relay\Relay|array|false | ||
1281 | { | ||
1282 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinter(...\func_get_args()); | ||
1283 | } | ||
1284 | |||
1285 | public function zintercard($keys, $limit = -1): \Relay\Relay|false|int | ||
1286 | { | ||
1287 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zintercard(...\func_get_args()); | ||
1288 | } | ||
1289 | |||
1290 | public function zinterstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int | ||
1291 | { | ||
1292 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zinterstore(...\func_get_args()); | ||
1293 | } | ||
1294 | |||
1295 | public function zunion($keys, $weights = null, $options = null): \Relay\Relay|array|false | ||
1296 | { | ||
1297 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunion(...\func_get_args()); | ||
1298 | } | ||
1299 | |||
1300 | public function zunionstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int | ||
1301 | { | ||
1302 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zunionstore(...\func_get_args()); | ||
1303 | } | ||
1304 | |||
1305 | public function zpopmin($key, $count = 1): \Relay\Relay|array|false | ||
1306 | { | ||
1307 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmin(...\func_get_args()); | ||
1308 | } | ||
1309 | |||
1310 | public function zpopmax($key, $count = 1): \Relay\Relay|array|false | ||
1311 | { | ||
1312 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->zpopmax(...\func_get_args()); | ||
1313 | } | ||
1314 | |||
1315 | public function _getKeys() | ||
1316 | { | ||
1317 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->_getKeys(...\func_get_args()); | ||
1318 | } | ||
1319 | } | ||
diff --git a/vendor/symfony/cache/Traits/RelayProxyTrait.php b/vendor/symfony/cache/Traits/RelayProxyTrait.php new file mode 100644 index 0000000..a1d252b --- /dev/null +++ b/vendor/symfony/cache/Traits/RelayProxyTrait.php | |||
@@ -0,0 +1,156 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Cache\Traits; | ||
13 | |||
14 | if (version_compare(phpversion('relay'), '0.8.1', '>=')) { | ||
15 | /** | ||
16 | * @internal | ||
17 | */ | ||
18 | trait RelayProxyTrait | ||
19 | { | ||
20 | public function copy($src, $dst, $options = null): \Relay\Relay|bool | ||
21 | { | ||
22 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); | ||
23 | } | ||
24 | |||
25 | public function jsonArrAppend($key, $value_or_array, $path = null): \Relay\Relay|array|false | ||
26 | { | ||
27 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrAppend(...\func_get_args()); | ||
28 | } | ||
29 | |||
30 | public function jsonArrIndex($key, $path, $value, $start = 0, $stop = -1): \Relay\Relay|array|false | ||
31 | { | ||
32 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrIndex(...\func_get_args()); | ||
33 | } | ||
34 | |||
35 | public function jsonArrInsert($key, $path, $index, $value, ...$other_values): \Relay\Relay|array|false | ||
36 | { | ||
37 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrInsert(...\func_get_args()); | ||
38 | } | ||
39 | |||
40 | public function jsonArrLen($key, $path = null): \Relay\Relay|array|false | ||
41 | { | ||
42 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrLen(...\func_get_args()); | ||
43 | } | ||
44 | |||
45 | public function jsonArrPop($key, $path = null, $index = -1): \Relay\Relay|array|false | ||
46 | { | ||
47 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrPop(...\func_get_args()); | ||
48 | } | ||
49 | |||
50 | public function jsonArrTrim($key, $path, $start, $stop): \Relay\Relay|array|false | ||
51 | { | ||
52 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonArrTrim(...\func_get_args()); | ||
53 | } | ||
54 | |||
55 | public function jsonClear($key, $path = null): \Relay\Relay|false|int | ||
56 | { | ||
57 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonClear(...\func_get_args()); | ||
58 | } | ||
59 | |||
60 | public function jsonDebug($command, $key, $path = null): \Relay\Relay|false|int | ||
61 | { | ||
62 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonDebug(...\func_get_args()); | ||
63 | } | ||
64 | |||
65 | public function jsonDel($key, $path = null): \Relay\Relay|false|int | ||
66 | { | ||
67 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonDel(...\func_get_args()); | ||
68 | } | ||
69 | |||
70 | public function jsonForget($key, $path = null): \Relay\Relay|false|int | ||
71 | { | ||
72 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonForget(...\func_get_args()); | ||
73 | } | ||
74 | |||
75 | public function jsonGet($key, $options = [], ...$paths): mixed | ||
76 | { | ||
77 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonGet(...\func_get_args()); | ||
78 | } | ||
79 | |||
80 | public function jsonMerge($key, $path, $value): \Relay\Relay|bool | ||
81 | { | ||
82 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMerge(...\func_get_args()); | ||
83 | } | ||
84 | |||
85 | public function jsonMget($key_or_array, $path): \Relay\Relay|array|false | ||
86 | { | ||
87 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMget(...\func_get_args()); | ||
88 | } | ||
89 | |||
90 | public function jsonMset($key, $path, $value, ...$other_triples): \Relay\Relay|bool | ||
91 | { | ||
92 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonMset(...\func_get_args()); | ||
93 | } | ||
94 | |||
95 | public function jsonNumIncrBy($key, $path, $value): \Relay\Relay|array|false | ||
96 | { | ||
97 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonNumIncrBy(...\func_get_args()); | ||
98 | } | ||
99 | |||
100 | public function jsonNumMultBy($key, $path, $value): \Relay\Relay|array|false | ||
101 | { | ||
102 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonNumMultBy(...\func_get_args()); | ||
103 | } | ||
104 | |||
105 | public function jsonObjKeys($key, $path = null): \Relay\Relay|array|false | ||
106 | { | ||
107 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonObjKeys(...\func_get_args()); | ||
108 | } | ||
109 | |||
110 | public function jsonObjLen($key, $path = null): \Relay\Relay|array|false | ||
111 | { | ||
112 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonObjLen(...\func_get_args()); | ||
113 | } | ||
114 | |||
115 | public function jsonResp($key, $path = null): \Relay\Relay|array|false|int|string | ||
116 | { | ||
117 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonResp(...\func_get_args()); | ||
118 | } | ||
119 | |||
120 | public function jsonSet($key, $path, $value, $condition = null): \Relay\Relay|bool | ||
121 | { | ||
122 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonSet(...\func_get_args()); | ||
123 | } | ||
124 | |||
125 | public function jsonStrAppend($key, $value, $path = null): \Relay\Relay|array|false | ||
126 | { | ||
127 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonStrAppend(...\func_get_args()); | ||
128 | } | ||
129 | |||
130 | public function jsonStrLen($key, $path = null): \Relay\Relay|array|false | ||
131 | { | ||
132 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonStrLen(...\func_get_args()); | ||
133 | } | ||
134 | |||
135 | public function jsonToggle($key, $path): \Relay\Relay|array|false | ||
136 | { | ||
137 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonToggle(...\func_get_args()); | ||
138 | } | ||
139 | |||
140 | public function jsonType($key, $path = null): \Relay\Relay|array|false | ||
141 | { | ||
142 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->jsonType(...\func_get_args()); | ||
143 | } | ||
144 | } | ||
145 | } else { | ||
146 | /** | ||
147 | * @internal | ||
148 | */ | ||
149 | trait RelayProxyTrait | ||
150 | { | ||
151 | public function copy($src, $dst, $options = null): \Relay\Relay|false|int | ||
152 | { | ||
153 | return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->copy(...\func_get_args()); | ||
154 | } | ||
155 | } | ||
156 | } | ||
diff --git a/vendor/symfony/cache/Traits/ValueWrapper.php b/vendor/symfony/cache/Traits/ValueWrapper.php new file mode 100644 index 0000000..718a23d --- /dev/null +++ b/vendor/symfony/cache/Traits/ValueWrapper.php | |||
@@ -0,0 +1,81 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | /** | ||
13 | * A short namespace-less class to serialize items with metadata. | ||
14 | * | ||
15 | * @author Nicolas Grekas <p@tchwork.com> | ||
16 | * | ||
17 | * @internal | ||
18 | */ | ||
19 | class © | ||
20 | { | ||
21 | private const EXPIRY_OFFSET = 1648206727; | ||
22 | private const INT32_MAX = 2147483647; | ||
23 | |||
24 | public readonly mixed $value; | ||
25 | public readonly array $metadata; | ||
26 | |||
27 | public function __construct(mixed $value, array $metadata) | ||
28 | { | ||
29 | $this->value = $value; | ||
30 | $this->metadata = $metadata; | ||
31 | } | ||
32 | |||
33 | public function __serialize(): array | ||
34 | { | ||
35 | // pack 31-bits ctime into 14bits | ||
36 | $c = $this->metadata['ctime'] ?? 0; | ||
37 | $c = match (true) { | ||
38 | $c > self::INT32_MAX - 2 => self::INT32_MAX, | ||
39 | $c > 0 => 1 + $c, | ||
40 | default => 1, | ||
41 | }; | ||
42 | $e = 0; | ||
43 | while (!(0x40000000 & $c)) { | ||
44 | $c <<= 1; | ||
45 | ++$e; | ||
46 | } | ||
47 | $c = (0x7FE0 & ($c >> 16)) | $e; | ||
48 | |||
49 | $pack = pack('Vn', (int) (0.1 + ($this->metadata['expiry'] ?: self::INT32_MAX + self::EXPIRY_OFFSET) - self::EXPIRY_OFFSET), $c); | ||
50 | |||
51 | if (isset($this->metadata['tags'])) { | ||
52 | $pack[4] = $pack[4] | "\x80"; | ||
53 | } | ||
54 | |||
55 | return [$pack => $this->value] + ($this->metadata['tags'] ?? []); | ||
56 | } | ||
57 | |||
58 | public function __unserialize(array $data): void | ||
59 | { | ||
60 | $pack = array_key_first($data); | ||
61 | $this->value = $data[$pack]; | ||
62 | |||
63 | if ($hasTags = "\x80" === ($pack[4] & "\x80")) { | ||
64 | unset($data[$pack]); | ||
65 | $pack[4] = $pack[4] & "\x7F"; | ||
66 | } | ||
67 | |||
68 | $metadata = unpack('Vexpiry/nctime', $pack); | ||
69 | $metadata['expiry'] += self::EXPIRY_OFFSET; | ||
70 | |||
71 | if (!$metadata['ctime'] = ((0x4000 | $metadata['ctime']) << 16 >> (0x1F & $metadata['ctime'])) - 1) { | ||
72 | unset($metadata['ctime']); | ||
73 | } | ||
74 | |||
75 | if ($hasTags) { | ||
76 | $metadata['tags'] = $data; | ||
77 | } | ||
78 | |||
79 | $this->metadata = $metadata; | ||
80 | } | ||
81 | } | ||