From ce90c17965c73c5dfba40b416ee4b5181f8efda7 Mon Sep 17 00:00:00 2001 From: paulburdick Date: Wed, 10 Oct 2007 15:08:25 +0000 Subject: A few quick changes to the XML-RPC docs to be clearer --- user_guide/libraries/xmlrpc.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index eb1904e16..d79c654e2 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -151,7 +151,7 @@ you will have to include the data type in the request array.

Here is an example of a simple array with three parameters:

-$request = array('John', 'Doe', 'www.example.com');
+$request = array('John', 'Doe', 'www.some-site.com');
$this->xmlrpc->request($request);

If you use data types other than strings, or if you have several different data types, you will place @@ -257,7 +257,7 @@ function might look:

                                ),
                         'struct');

-        $this->xmlrpc->send_response($response);
+        return $this->xmlrpc->send_response($response);
    }
}
@@ -277,13 +277,13 @@ In the above example, the output parameters will be the username and password.that contains a single item. This item can be an array with several additional arrays, but there can be only one primary array index. In other words, the basic prototype is this:

-$request = array('Response data', 'array'); +$response = array('Response data', 'array');

Responses, however, usually contain multiple pieces of information. In order to accomplish this we must put the response into its own array so that the primary array continues to contain a single piece of data. Here's an example showing how this might be accomplished:

-$request = array (
+$response = array (
                   array(
                         'first_name' => array('John', 'string'),
                         'last_name' => array('Doe', 'string'),
@@ -366,7 +366,6 @@ class Xmlrpc_server extends Controller { function index() { - $this->load->library('xmlrpc'); $this->load->library('xmlrpcs'); -- cgit v1.2.3-24-g4f1b