+
+/**
+ * @deprecated
+ */
+function build_client_wrapper_code($client, $verbatim_client_copy, $prefix='xmlrpc')
+{
+ $code = "\$client = new {$prefix}_client('".str_replace("'", "\'", $client->path).
+ "', '" . str_replace("'", "\'", $client->server) . "', $client->port);\n";
+
+ // copy all client fields to the client that will be generated runtime
+ // (this provides for future expansion or subclassing of client obj)
+ if ($verbatim_client_copy)
+ {
+ foreach($client as $fld => $val)
+ {
+ if($fld != 'debug' && $fld != 'return_type')
+ {
+ $val = var_export($val, true);
+ $code .= "\$client->$fld = $val;\n";
+ }
+ }
+ }
+ // only make sure that client always returns the correct data type
+ $code .= "\$client->return_type = '{$prefix}vals';\n";
+ //$code .= "\$client->setDebug(\$debug);\n";
+ return $code;
+}