Browse Source

Remove ConnectionParameters::__toString() (reverts ca6ff4f and e67cfe2).

Daniele Alessandri 14 years ago
parent
commit
aaa16c8276
1 changed files with 0 additions and 21 deletions
  1. 0 21
      lib/Predis.php

+ 0 - 21
lib/Predis.php

@@ -1289,27 +1289,6 @@ class ConnectionParameters {
     public function __isset($parameter) {
         return isset($this->_parameters[$parameter]);
     }
-
-    public function __toString() {
-        $str = null;
-        if ($this->scheme === 'unix') {
-            $str = "{$this->scheme}://{$this->path}";
-        }
-        else {
-            $str = "{$this->scheme}://{$this->host}:{$this->port}";
-        }
-
-        $query = array();
-        $reject = array('scheme', 'host', 'port', 'password', 'path');
-        foreach ($this->_parameters as $k => $v) {
-            if (in_array($k, $reject) || $v === null) {
-                continue;
-            }
-            $v = $v === false ? '0' : $v;
-            $query[] = $k . '=' . ($v === false ? '0' : $v);
-        }
-        return count($query) > 0 ? ($str . '/?' . implode('&', $query)) : $str;
-    }
 }
 
 interface IConnection {