mirror of
https://github.com/predis/predis.git
synced 2026-08-18 04:11:01 +00:00
7bb2192294
This method improves the previous one, which worked only by picking a connection by ID, allowing users to specify a selector type among the following ones: "id", "key", "slot", "command". These selectors are expanded internally to methods, invoked against the connection object in use by the client, that follow the getConnectionByXXX() convention already in use through the library: id => getConnectionById() key => getConnectionByKey() slot => getConnectionBySlot() command => getConnectionByCommand() The underlying connection does not necessarily need to implement the aggregate connection interface as the client relies on a duck-typing approach by using method_exists().