-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added RedisClient v6
- Loading branch information
Showing
45 changed files
with
1,734 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* This file is part of RedisClient. | ||
* git: https://github.com/cheprasov/php-redis-client | ||
* | ||
* (C) Alexander Cheprasov <acheprasov84@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace RedisClient\Client\Version; | ||
|
||
use RedisClient\Client\AbstractRedisClient; | ||
use RedisClient\Command\Traits\Version6x0\CommandsTrait; | ||
use RedisClient\Pipeline\PipelineInterface; | ||
use RedisClient\Pipeline\Version\Pipeline6x0; | ||
|
||
class RedisClient6x0 extends AbstractRedisClient { | ||
use CommandsTrait; | ||
|
||
/** | ||
* @param \Closure|null $Pipeline | ||
* @return PipelineInterface | ||
*/ | ||
protected function createPipeline(\Closure $Pipeline = null) { | ||
return new Pipeline6x0($Pipeline); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/RedisClient/Command/Traits/Version5x0/ConnectionCommandsTrait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* This file is part of RedisClient. | ||
* git: https://github.com/cheprasov/php-redis-client | ||
* | ||
* (C) Alexander Cheprasov <acheprasov84@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace RedisClient\Command\Traits\Version5x0; | ||
|
||
use RedisClient\Command\Traits\Version4x0\ConnectionCommandsTrait as ConnectionCommandsTraitVersion4x0; | ||
|
||
/** | ||
* Connection Commands | ||
* @link http://redis.io/commands#connection | ||
*/ | ||
trait ConnectionCommandsTrait { | ||
|
||
use ConnectionCommandsTraitVersion4x0; | ||
|
||
/** | ||
* CLIENT ID | ||
* @link http://redis.io/commands/client-id | ||
* | ||
* @return int | ||
*/ | ||
public function clientId() { | ||
return $this->returnCommand(['CLIENT', 'ID'], null, null); | ||
} | ||
|
||
/** | ||
* CLIENT UNBLOCK client-id [TIMEOUT|ERROR] | ||
* @link https://redis.io/commands/client-unblock | ||
* | ||
* @param int $clientId | ||
* @param string|null $timeoutOrError | ||
* @return int | ||
*/ | ||
public function clientUnblock($clientId, $timeoutOrError = null) { | ||
$params = [$clientId]; | ||
if ($timeoutOrError) { | ||
$params[] = $timeoutOrError; | ||
} | ||
return $this->returnCommand(['CLIENT', 'UNBLOCK'], null, $params); | ||
} | ||
|
||
} |
57 changes: 57 additions & 0 deletions
57
src/RedisClient/Command/Traits/Version6x0/CommandsTrait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* This file is part of RedisClient. | ||
* git: https://github.com/cheprasov/php-redis-client | ||
* | ||
* (C) Alexander Cheprasov <acheprasov84@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
namespace RedisClient\Command\Traits\Version6x0; | ||
|
||
|
||
use RedisClient\Command\Traits\AbstractCommandsTrait; | ||
use RedisClient\Command\Traits\Version2x6\TransactionsCommandsTrait; | ||
use RedisClient\Command\Traits\Version2x8\HyperLogLogCommandsTrait; | ||
use RedisClient\Command\Traits\Version2x8\LatencyCommandsTrait; | ||
use RedisClient\Command\Traits\Version2x8\PubSubCommandsTrait; | ||
use RedisClient\Command\Traits\Version3x0\ClusterCommandsTrait; | ||
use RedisClient\Command\Traits\Version3x2\GeoCommandsTrait; | ||
use RedisClient\Command\Traits\Version3x2\HashesCommandsTrait; | ||
use RedisClient\Command\Traits\Version3x2\ScriptingCommandsTrait; | ||
use RedisClient\Command\Traits\Version3x2\SetsCommandsTrait; | ||
use RedisClient\Command\Traits\Version4x0\KeysCommandsTrait; | ||
use RedisClient\Command\Traits\Version4x0\MemoryCommandsTrait; | ||
use RedisClient\Command\Traits\Version5x0\SortedSetsCommandsTrait; | ||
|
||
trait CommandsTrait { | ||
|
||
use AbstractCommandsTrait; | ||
|
||
use ClusterCommandsTrait; | ||
use ConnectionCommandsTrait; | ||
use GeoCommandsTrait; | ||
use HashesCommandsTrait; | ||
use HyperLogLogCommandsTrait; | ||
use KeysCommandsTrait; | ||
use LatencyCommandsTrait; | ||
use ListsCommandsTrait; | ||
use MemoryCommandsTrait; | ||
use PubSubCommandsTrait; | ||
use ScriptingCommandsTrait; | ||
use ServerCommandsTrait; | ||
use SetsCommandsTrait; | ||
use SortedSetsCommandsTrait; | ||
use StreamsCommandsTrait; | ||
use StringsCommandsTrait; | ||
use TransactionsCommandsTrait; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSupportedVersion() { | ||
return '6.0'; | ||
} | ||
|
||
} |
Oops, something went wrong.