forked from Kdyby/Redis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Kdyby#80 from pmgdev/compatibility-with-phpredis-4
Can be used with phpredis v3 and also with v4
- Loading branch information
Showing
6 changed files
with
313 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Kdyby (http://www.kdyby.org) | ||
* | ||
* Copyright (c) 2008 Filip Procházka (filip@prochazka.su) | ||
* | ||
* For the full copyright and license information, please view the file license.txt that was distributed with this source code. | ||
*/ | ||
|
||
namespace Kdyby\Redis\Driver; | ||
|
||
use Kdyby; | ||
use Nette; | ||
|
||
|
||
|
||
/** | ||
* @author Filip Procházka <filip@prochazka.su> | ||
*/ | ||
class PhpRedisDriverOld extends \Redis implements Kdyby\Redis\IRedisDriverOld | ||
{ | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function connect($host, $port = NULL, $timeout = 0) | ||
{ | ||
$args = func_get_args(); | ||
return @call_user_func_array('parent::connect', $args); // intentionally @ - from v3.1.0 Redis::connect() throws warning on failed | ||
} | ||
|
||
|
||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function select($database) | ||
{ | ||
$args = func_get_args(); | ||
return call_user_func_array('parent::select', $args); | ||
} | ||
|
||
|
||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function script($command, $script = NULL) | ||
{ | ||
$args = func_get_args(); | ||
return call_user_func_array('parent::script', $args); | ||
} | ||
|
||
|
||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function evalsha($scriptSha, $argsArray = [], $numKeys = 0) | ||
{ | ||
$args = func_get_args(); | ||
return call_user_func_array('parent::evalsha', $args); | ||
} | ||
|
||
} |
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
Oops, something went wrong.