sync stubs with v0.7.0

This commit is contained in:
Till Krüss 2024-01-02 16:27:04 -08:00 committed by Ivan Fedorov
parent bf4fb68f0a
commit 572cacbaf3
4 changed files with 2533 additions and 37 deletions

View File

@ -867,6 +867,7 @@ const CLASSES = array (
'ReflectionZendExtension' => 'Reflection/ReflectionZendExtension.php',
'Reflector' => 'Reflection/Reflector.php',
'RegexIterator' => 'SPL/SPL.php',
'Relay\\Cluster' => 'relay/Cluster.php',
'Relay\\Event' => 'relay/Event.php',
'Relay\\Exception' => 'relay/Exception.php',
'Relay\\KeyType' => 'relay/KeyType.php',

2463
relay/Cluster.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,14 +12,14 @@ class Relay
*
* @var string
*/
public const VERSION = "0.6.8";
public const VERSION = "0.7.0";
/**
* Relay's version.
*
* @var string
*/
public const Version = "0.6.8";
public const Version = "0.7.0";
/**
* Integer representing no compression algorithm.
@ -87,7 +87,7 @@ class Relay
/**
* Integer representing the atomic mode.
*
* @see \Relay\Relay::getMode()
* @see Relay::getMode()
* @var int
*/
public const ATOMIC = 0x00;
@ -95,7 +95,7 @@ class Relay
/**
* Integer representing the pipeline mode.
*
* @see \Relay\Relay::getMode()
* @see Relay::getMode()
* @var int
*/
public const PIPELINE = 0x02;
@ -103,7 +103,7 @@ class Relay
/**
* Integer representing the `MULTI` mode.
*
* @see \Relay\Relay::getMode()
* @see Relay::getMode()
* @var int
*/
public const MULTI = 0x01;
@ -113,7 +113,7 @@ class Relay
* only really be accessed when `true` is passed to `getMask()` telling
* relay to return the complete bitmasked mode.
*
* @see \Relay\Relay::getMode()
* @see Relay::getMode()
* @var int
**/
public const SUBSCRIBED = 0x04;
@ -351,7 +351,7 @@ class Relay
/**
* Integer representing "key not found".
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_NOT_FOUND = 0;
@ -359,7 +359,7 @@ class Relay
/**
* Integer representing Redis `string` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_STRING = 1;
@ -367,7 +367,7 @@ class Relay
/**
* Integer representing Redis `set` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_SET = 2;
@ -375,7 +375,7 @@ class Relay
/**
* Integer representing Redis `list` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_LIST = 3;
@ -383,7 +383,7 @@ class Relay
/**
* Integer representing Redis `zset` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_ZSET = 4;
@ -391,7 +391,7 @@ class Relay
/**
* Integer representing Redis `hash` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_HASH = 5;
@ -399,7 +399,7 @@ class Relay
/**
* Integer representing Redis `stream` type.
*
* @see \Relay\Relay::type()
* @see Relay::type()
* @var int
*/
public const REDIS_STREAM = 6;
@ -631,7 +631,7 @@ class Relay
* Returns the number of bytes sent and received over the network during the Relay object's
* lifetime, or since the last time {@link Relay::clearBytes()} was called.
*
* @return array{int, int}
* @return array
*/
#[\Relay\Attributes\Local]
public function getBytes(): array {}
@ -639,7 +639,7 @@ class Relay
/**
* @see Relay\Relay::getBytes()
*
* @return array{int, int}
* @return array
*/
#[\Relay\Attributes\Local]
public function bytes(): array {}
@ -787,14 +787,6 @@ class Relay
#[\Relay\Attributes\Local]
public function socketId(): string|false {}
/**
* Returns information about the license.
*
* @return array
*/
#[\Relay\Attributes\Local]
public static function license(): array {}
/**
* Returns statistics about Relay.
*
@ -893,20 +885,20 @@ class Relay
/**
* Deletes all the keys of the currently selected database.
*
* @param bool $async
* @param bool|null $sync
* @return Relay|bool
*/
#[\Relay\Attributes\RedisCommand]
public function flushdb(bool $async = false): Relay|bool {}
public function flushdb(?bool $sync = null): Relay|bool {}
/**
* Deletes all the keys of all the existing databases, not just the currently selected one.
*
* @param bool $async
* @param bool|null $sync
* @return Relay|bool
*/
#[\Relay\Attributes\RedisCommand]
public function flushall(bool $async = false): Relay|bool {}
public function flushall(?bool $sync = null): Relay|bool {}
/**
* Invokes a Redis function.
@ -1088,6 +1080,17 @@ class Relay
#[\Relay\Attributes\RedisCommand]
public function lastsave(): Relay|int|false {}
/**
* Get the longest common subsequence between two string keys.
*
* @param mixed $key1
* @param mixed $key2
* @param array|null $options
* @return mixed
*/
#[\Relay\Attributes\RedisCommand]
public function lcs(mixed $key1, mixed $key2, ?array $options = null): mixed {}
/**
* Asynchronously save the dataset to disk.
*
@ -3313,4 +3316,12 @@ class Relay
*/
#[\Relay\Attributes\Local]
public function _getKeys() {}
/**
* Returns information about the license.
*
* @return array
*/
#[\Relay\Attributes\Local]
public static function license(): array {}
}

View File

@ -8,15 +8,15 @@ namespace Relay;
class Table
{
/**
* Create a table instance.
* Create a Relay table instance.
*
* @param string|null $namespace
* @param int $serializer
*/
public function __construct(int $serializer = \Relay\Relay::SERIALIZER_PHP) {}
public function __construct(?string $namespace = null, int $serializer = Relay::SERIALIZER_PHP) {}
/**
* Get a key from the table.
* Will return `null` if key doesn't exist.
* Returns a key, or `null` if key doesn't exist.
*
* @param string $key
* @return mixed
@ -24,19 +24,19 @@ class Table
public function get(string $key): mixed {}
/**
* Get a field of a cached key. This is an array lookup.
* Pluck a key from a cached key.
*
* @param string $key
* @param string $field
* @return mixed
*/
public function getField(string $key, string $field): mixed {}
public function pluck(string $key, string $field): mixed {}
/**
* Set a key in the table.
* Set a key and its value.
*
* @param string $key
* @param mixed $value;
* @param mixed $value {}
* @return bool
*/
public function set(string $key, mixed $value): bool {}
@ -57,6 +57,27 @@ class Table
*/
public function delete(string $key): bool {}
/**
* The number of keys stored in the table.
*
* @return int
*/
public function count(): int {}
/**
* Get the table's namespace.
*
* @return string|null
*/
public function namespace(): string|null {}
/**
* Returns all table namespaces.
*
* @return array
*/
public static function namespaces(): array {}
/**
* Removes all keys from the table.
*
@ -65,9 +86,9 @@ class Table
public function clear(): bool {}
/**
* Get the number of keys stored in the table.
* Removes all keys from all tables.
*
* @return int
*/
public function count(): int {}
public static function clearAll(): int {}
}