mirror of
https://github.com/predis/predis.git
synced 2026-10-15 08:17:05 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user