40 | Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by phpDocumentor 1.4.3
41 |
42 |
43 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | Readme Ripcord: Easy XML-RPC Client and Server for PHP 5
2 | =============================================================================
3 |
4 | Ripcord is a very easy to use XML-RPC library for PHP. It provides client,
5 | server and auto documentation features for XML-RPC but also SimpleRPC and
6 | simplified SOAP (1.1). It uses PHP's xmlrpc library and it needs at least PHP 5.
7 |
8 | To create a simple xmlrpc client do something like this:
9 |
10 | film->getScore( 'e3dee9d19a8c3af7c92f9067d2945b59', 500 );
14 | ?>
15 |
16 | See the RipcordClientManual
17 | for more information.
18 |
19 | To create a simple xmlrpc server do something like this:
20 |
21 | run();
31 | ?>
32 |
33 | See the RipcordServerManual
34 | for more information.
35 |
36 |
37 | Extending Ripcord
38 | =================
39 |
40 | Ripcord is also very simple to extend. All functionality can be changed
41 | through dependency injection. The client by default uses the PHP Streams API
42 | to connect to a server, but can simply be reconfigured to use CURL. You
43 | can provide your own configuration or even a completely new transport method
44 | by simply injecting a new transport object into the client.
45 |
46 | Any server created with Ripcord is auto documenting by default. Simply browse
47 | to the URL of your RPC server and you will see a list of all methods including
48 | any inline documentation for that method, if you use docblock style comments, e.g.:
49 |
50 | /**
51 | * This will show up with your method description.
52 | */
53 | function yourMethod() {
54 | }
55 |
56 | The auto documentor is again easily extended to use your own styles or extensions
57 | and you can simply inject a completely different documentor object into the server
58 | if you want. Or skip it altogether.
59 |
60 |
61 | Documentation
62 | =============
63 |
64 | The full API documentation is included in the docs/ directory.
65 |
66 |
--------------------------------------------------------------------------------
/docs/classtrees_Ripcord.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
60 | This class implements the default documentor for the ripcord server. Any request to the server without a request_xml is handled by the documentor.
61 |
This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.
This class is used whenever prerequisite requirements are not met.
31 |
ripcord::xmlrpcNotInstalled (-5) PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.
52 | The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types and check for errors.
53 |
100 | This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | Documentation generated on Tue, 16 Nov 2010 16:20:15 +0100 by phpDocumentor 1.4.3
113 |
54 | This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was a native method of the rpc client.
55 |
70 | This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.
71 |
This class provides the fetch interface for system.multiCall. It is returned
26 |
when calling $client->system->multiCall() with no arguments. Upon construction it puts the originating client into multiCall deferred mode. The client will gather the requested method calls instead of executing them immediately. It will them execute all of them, in order, when calling $client->system->multiCall()->fetch(). This class extends Ripcord_Client only so it has access to its protected _multiCall property.
This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.
This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.
25 |
You can create an XML-RPC (or Simple RPC or a simple SOAP 1.1) server by defining a class with public methods and passing an object (or array of objects) of this class to the constructor of Ripcord_Server. Then simply call the run() method.
You don't need to instantiate a class to use it with Ripcord, in the above example 'myOtherClass' is the name of a PHP class to use. In addition you may also specify functions or methods directly, in any format that matches PHP's is_callable() criteria.
140 | mixed
141 | $services.: Optional. An object or array of objects. The public methods in these objects will be exposed through the RPC server. If the services array has non-numeric keys, the key for each object will define its namespace.
142 |
143 | array
144 | $options.: Optional. Allows you to override the default server settings. Accepted key names are:
'documentor': allows you to specify an alternative HTML documentor class, or if set to false, no HTML documentor.
'name' : The name of the server, used by the default HTML documentor.
'css' : An url of a css file to link to in the HTML documentation.
'wsdl' : The wsdl 1.0 description of this service (only usefull if you run the 'soap 1.1' version, or the 'auto' version
'wsdl2' : The wsdl 2.0 description of this service
In addition you can set any of the outputOptions for the xmlrpc server.
145 |
146 |
147 | $services
148 |
149 |
150 | $options
151 |
152 |
153 | $documentor
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | addMethod (line 185)
163 |
164 |
165 |
166 |
Allows you to add a single method to the server after construction.
333 | string
334 | $option: The name of the option
335 |
336 | mixed
337 | $value: The value of the option The options are:
output_type: Return data as either php native data or xml encoded. Can be either 'php' or 'xml'. 'xml' is the default.
verbosity: Determines the compactness of generated xml. Can be either 'no_white_space', 'newlines_only' or 'pretty'.
338 | 'pretty' is the default.
escaping: Determines how/whether to escape certain characters. 1 or more values are allowed. If multiple, they need
339 | to be specified as a sub-array. Options are: 'cdata', 'non-ascii', 'non-print' and 'markup'. Default is 'non-ascii',
340 | 'non-print' and 'markup'.
version: Version of the xml vocabulary to use. Currently, three are supported: 'xmlrpc', 'soap 1.1' and 'simple'. The
341 | keyword 'auto' is also recognized and tells the server to respond in whichever version the request cam in. 'auto' is
342 | the default.
encoding: The character encoding that the data is in. Can be any supported character encoding. Default is 'utf-8'.
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 | Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by phpDocumentor 1.4.3
354 |