mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Remove the static method Predis\Client::create().
This commit is contained in:
@@ -38,25 +38,6 @@ class Client {
|
||||
$this->setupConnection($parameters);
|
||||
}
|
||||
|
||||
public static function create(/* arguments */) {
|
||||
$argv = func_get_args();
|
||||
$argc = func_num_args();
|
||||
|
||||
$options = null;
|
||||
$lastArg = $argv[$argc-1];
|
||||
if ($argc > 0 && !is_string($lastArg) && ($lastArg instanceof ClientOptions ||
|
||||
is_subclass_of($lastArg, '\Predis\RedisServerProfile'))) {
|
||||
$options = array_pop($argv);
|
||||
$argc--;
|
||||
}
|
||||
|
||||
if ($argc === 0) {
|
||||
throw new ClientException('Missing connection parameters');
|
||||
}
|
||||
|
||||
return new Client($argc === 1 ? $argv[0] : $argv, $options);
|
||||
}
|
||||
|
||||
private static function filterClientOptions($options) {
|
||||
if ($options instanceof ClientOptions) {
|
||||
return $options;
|
||||
|
||||
@@ -65,7 +65,7 @@ class RC {
|
||||
$handle = popen('php', 'w');
|
||||
fwrite($handle, "<?php
|
||||
require '../lib/Predis.php';
|
||||
\$redis = Predis\Client::create('$redisUri');
|
||||
\$redis = new Predis\Client('$redisUri');
|
||||
\$redis->rpush('{$op}1', 'a');
|
||||
\$redis->rpush('{$op}2', 'b');
|
||||
\$redis->rpush('{$op}3', 'c');
|
||||
|
||||
Reference in New Issue
Block a user