/** * Remove the connection for this class. This will close the active * connection and the defined connection (if they exist). The result * can be used as argument for establishConnection, for easy */ public static function removeConnection() { $spec = self::$_connectionSpec; $conn = self::$_activeConnection; self::$_connectionSpec = null; self::$_activeConnection = null; if ($conn) { $conn->disconnect(); } return $spec ? $spec : ''; }