Partially rewrite the client options bits and remove some madness.

The concept is now similar to a little dependency-injection system.
This commit is contained in:
Daniele Alessandri
2011-12-01 09:01:13 +01:00
parent 1ae30d62db
commit a5bf0eb41a
10 changed files with 61 additions and 73 deletions
+3 -1
View File
@@ -12,9 +12,11 @@
namespace Predis;
use Predis\Commands\ICommand;
use Predis\Options\IClientOptions;
use Predis\Network\IConnection;
use Predis\Network\IConnectionSingle;
use Predis\Profiles\IServerProfile;
use Predis\Options\ClientOptions;
use Predis\Profiles\ServerProfile;
use Predis\PubSub\PubSubContext;
use Predis\Pipeline\PipelineContext;
@@ -72,7 +74,7 @@ class Client
if (is_array($options)) {
return new ClientOptions($options);
}
if ($options instanceof ClientOptions) {
if ($options instanceof IClientOptions) {
return $options;
}
if ($options instanceof IServerProfile) {