Remove the static method Predis\Client::create().

This commit is contained in:
Daniele Alessandri
2010-08-15 17:52:50 +02:00
parent 3487cc219c
commit b40c2fd214
2 changed files with 1 additions and 20 deletions
-19
View File
@@ -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;
+1 -1
View File
@@ -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');