From dd6719738936be31cdaa1758ca86d5eb14dcab3d Mon Sep 17 00:00:00 2001 From: Barry Mieny Date: Mon, 4 Oct 2010 16:33:58 +0200 Subject: Cleanup of stray spaces and tabs --- user_guide/libraries/xmlrpc.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'user_guide/libraries/xmlrpc.html') diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index 8d1dbdf5f..971ab0296 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -192,7 +192,7 @@ The allowed methods are on the left side of the array. When either of those are

The 'object' key is a special key that you pass an instantiated class object with, which is necessary when the method you are mapping to is not part of the CodeIgniter super object.

- +

In other words, if an XML-RPC Client sends a request for the new_post method, your server will load the My_blog class and call the new_entry function. If the request is for the update_post method, your @@ -202,7 +202,7 @@ server will load the My_blog class and call the update_entry

There are two additional configuration keys you may make use of when initializing the server class: debug can be set to TRUE in order to enable debugging, and xss_clean may be set to FALSE to prevent sending data through the Security library's xss_clean function. - +

Processing Server Requests

When the XML-RPC Server receives a request and loads the class/method for processing, it will pass @@ -324,20 +324,20 @@ In it, place this code and save it to your applications/controllers/<?php class Xmlrpc_client extends Controller { - + function index() - { + { $this->load->helper('url'); $server_url = site_url('xmlrpc_server'); - + $this->load->library('xmlrpc'); - + $this->xmlrpc->server($server_url, 80); $this->xmlrpc->method('Greetings'); - + $request = array('How is it going?'); - $this->xmlrpc->request($request); - + $this->xmlrpc->request($request); + if ( ! $this->xmlrpc->send_request()) { echo $this->xmlrpc->display_error(); @@ -367,24 +367,24 @@ class Xmlrpc_server extends Controller { { $this->load->library('xmlrpc'); $this->load->library('xmlrpcs'); - + $config['functions']['Greetings'] = array('function' => 'Xmlrpc_server.process'); - + $this->xmlrpcs->initialize($config); $this->xmlrpcs->serve(); } - - + + function process($request) { $parameters = $request->output_parameters(); - + $response = array( array( 'you_said' => $parameters['0'], 'i_respond' => 'Not bad at all.'), 'struct'); - + return $this->xmlrpc->send_response($response); } } @@ -422,7 +422,7 @@ The Server receives the request and maps it to the "process" function, where a r                        )
                 );
$this->xmlrpc->request($request); - +

You can retrieve the associative array when processing the request in the Server.

$parameters = $request->output_parameters();
-- cgit v1.2.3-24-g4f1b