mirror of
https://github.com/predis/predis.git
synced 2026-10-09 05:16:32 +00:00
Switch from server profiles to commands factory.
This change reduces some unnecessary complexity in the library, Redis commands do not change much after all. Developers can still implement their own commands factory, inject new commands or override existing ones. The "profile" client options has been renamed to "commands" and it accepts instances of Predis\Command\FactoryInterface. The test suite checks at runtime the version of the running instance of Redis for integration tests to adapt itself automatically.
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
namespace Predis;
|
||||
|
||||
use Predis\Command\CommandInterface;
|
||||
use Predis\Command\FactoryInterface;
|
||||
use Predis\Configuration\OptionsInterface;
|
||||
use Predis\Connection\ConnectionInterface;
|
||||
use Predis\Profile\ProfileInterface;
|
||||
|
||||
/**
|
||||
* Interface defining a client able to execute commands against Redis.
|
||||
@@ -177,11 +177,11 @@ use Predis\Profile\ProfileInterface;
|
||||
interface ClientInterface
|
||||
{
|
||||
/**
|
||||
* Returns the server profile used by the client.
|
||||
* Returns the command factory used by the client.
|
||||
*
|
||||
* @return ProfileInterface
|
||||
* @return FactoryInterface
|
||||
*/
|
||||
public function getProfile();
|
||||
public function getCommandFactory();
|
||||
|
||||
/**
|
||||
* Returns the client options specified upon initialization.
|
||||
|
||||
Reference in New Issue
Block a user