mirror of
https://github.com/predis/predis.git
synced 2026-10-09 21:38:07 +00:00
Add the ability to define custom handlers for client options and connection parameters.
This commit is contained in:
@@ -57,6 +57,16 @@ class ConnectionParameters {
|
||||
return self::$_sharedOptions;
|
||||
}
|
||||
|
||||
public static function define($name, Options\IOption $option) {
|
||||
self::getSharedOptions();
|
||||
self::$_sharedOptions[$name] = $option;
|
||||
}
|
||||
|
||||
public static function undefine($name) {
|
||||
self::getSharedOptions();
|
||||
unset(self::$_sharedOptions[$name]);
|
||||
}
|
||||
|
||||
protected function parseURI($uri) {
|
||||
if (!is_string($uri)) {
|
||||
throw new \InvalidArgumentException('URI must be a string');
|
||||
|
||||
Reference in New Issue
Block a user