Allow users to undefine a default parameter.

This commit is contained in:
Daniele Alessandri
2011-04-03 10:45:47 +02:00
parent 6fe57bae3f
commit 5ab210fd9d
+5
View File
@@ -75,6 +75,11 @@ class ConnectionParameters implements IConnectionParameters {
self::$_validators[$parameter] = $callable;
}
public static function undefine($parameter) {
self::ensureDefaults();
unset(self::$_defaultParameters[$parameter], self::$_validators[$parameter]);
}
private function parseURI($uri) {
if (stripos($uri, 'unix') === 0) {
// Hack to support URIs for UNIX sockets with minimal effort.