diff options
Diffstat (limited to 'modules/xmlrpc/doc/xmlrpcmsg.html')
-rw-r--r-- | modules/xmlrpc/doc/xmlrpcmsg.html | 507 |
1 files changed, 507 insertions, 0 deletions
diff --git a/modules/xmlrpc/doc/xmlrpcmsg.html b/modules/xmlrpc/doc/xmlrpcmsg.html new file mode 100644 index 00000000..958ff3a2 --- /dev/null +++ b/modules/xmlrpc/doc/xmlrpcmsg.html @@ -0,0 +1,507 @@ +<HTML +><HEAD +><TITLE +>xmlrpcmsg</TITLE +><META +NAME="GENERATOR" +CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"><LINK +REV="MADE" +HREF="edd@usefulinc.com"><LINK +REL="HOME" +TITLE="XML-RPC for PHP" +HREF="index.html"><LINK +REL="UP" +TITLE="Class documentation" +HREF="apidocs.html"><LINK +REL="PREVIOUS" +TITLE="Class documentation" +HREF="apidocs.html"><LINK +REL="NEXT" +TITLE="xmlrpcresp" +HREF="xmlrpcresp.html"></HEAD +><BODY +CLASS="SECT1" +BGCOLOR="#FFFFFF" +TEXT="#000000" +LINK="#0000FF" +VLINK="#840084" +ALINK="#0000FF" +><DIV +CLASS="NAVHEADER" +><TABLE +SUMMARY="Header navigation table" +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TH +COLSPAN="3" +ALIGN="center" +>XML-RPC for PHP: version 1.1</TH +></TR +><TR +><TD +WIDTH="10%" +ALIGN="left" +VALIGN="bottom" +><A +HREF="apidocs.html" +ACCESSKEY="P" +>Prev</A +></TD +><TD +WIDTH="80%" +ALIGN="center" +VALIGN="bottom" +>Chapter 5. Class documentation</TD +><TD +WIDTH="10%" +ALIGN="right" +VALIGN="bottom" +><A +HREF="xmlrpcresp.html" +ACCESSKEY="N" +>Next</A +></TD +></TR +></TABLE +><HR +ALIGN="LEFT" +WIDTH="100%"></DIV +><DIV +CLASS="SECT1" +><H1 +CLASS="SECT1" +><A +NAME="XMLRPCMSG" +></A +>xmlrpcmsg</H1 +><P +>This class provides a representation for a request to an + XML-RPC server. A client sends an + <TT +CLASS="CLASSNAME" +>xmlrpcmsg</TT +> to a server, and receives back + an <TT +CLASS="CLASSNAME" +>xmlrpcresp</TT +> (see <A +HREF="apidocs.html#XMLRPC-CLIENT-SEND" +>xmlrpc_client->send</A +>).</P +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN289" +></A +>Creation</H2 +><P +>The constructor takes the following form:</P +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN292" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$msg=new xmlrpcmsg</CODE +>($methodName, $parameterArray);</CODE +></P +><P +></P +></DIV +><P +>Where <TT +CLASS="PARAMETER" +><I +>$methodName</I +></TT +> is a string + indicating the name of the method you wish to invoke, and + <TT +CLASS="PARAMETER" +><I +>$parameterArray</I +></TT +> is a simple + <TT +CLASS="CLASSNAME" +>Array</TT +> of + <TT +CLASS="CLASSNAME" +>xmlrpcval</TT +> objects. Here's an example + message to the <SPAN +CLASS="emphasis" +><I +CLASS="EMPHASIS" +>US state name</I +></SPAN +> server: + </P +><PRE +CLASS="PROGRAMLISTING" +>$msg=new xmlrpcmsg("examples.getStateName", + array(new xmlrpcval(23, "int"))); + </PRE +><P +> This example requests the name of state number 23. For more + information on <TT +CLASS="CLASSNAME" +>xmlrpcval</TT +> objects, see + <A +HREF="xmlrpcval.html" +>xmlrpcval</A +>. + </P +></DIV +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN309" +></A +>Methods</H2 +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN311" +></A +>serialize</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN313" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$outString=$msg->serialize</CODE +>();</CODE +></P +><P +></P +></DIV +><P +>Returns the an XML string representing the XML-RPC + message.</P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN318" +></A +>addParam</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN320" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$msg->addParam</CODE +>($xmlrpcVal);</CODE +></P +><P +></P +></DIV +><P +>Adds the <TT +CLASS="CLASSNAME" +>xmlrpcval</TT +> + <TT +CLASS="PARAMETER" +><I +>$xmlrpcVal</I +></TT +> to the parameter list for + this method call.</P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN328" +></A +>getParam</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN330" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$xmlrpcVal=$msg->getParam</CODE +>($n);</CODE +></P +><P +></P +></DIV +><P +>Gets the <TT +CLASS="PARAMETER" +><I +>$n</I +></TT +>th parameter in the + message. Use this method in server implementations. Returns + the <TT +CLASS="LITERAL" +>undef</TT +> value if no such parameter + exists.</P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN338" +></A +>getNumParams</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN340" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$n=$msg->getNumParams</CODE +>();</CODE +></P +><P +></P +></DIV +><P +> Returns the number of parameters attached to this message. + </P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN345" +></A +>method</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN347" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$methName=$msg->method</CODE +>();</CODE +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$msg->method</CODE +>($methName);</CODE +></P +><P +></P +></DIV +><P +>Gets or sets the method contained in the XML-RPC message.</P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN356" +></A +>parseResponse</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN358" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$response=$msg->parseResponse</CODE +>($xmlString);</CODE +></P +><P +></P +></DIV +><P +>Given an incoming XML-RPC server response contained in + the string + <TT +CLASS="PARAMETER" +><I +>$xmlString</I +></TT +>, this method constructs + an <TT +CLASS="CLASSNAME" +>xmlrpcresp</TT +> response object and + returns it, setting error codes as appropriate (see <A +HREF="apidocs.html#XMLRPC-CLIENT-SEND" +>xmlrpc_client->send</A +>). + </P +><P +> This method processes any HTTP/MIME headers it finds. + </P +></DIV +><DIV +CLASS="SECT3" +><H3 +CLASS="SECT3" +><A +NAME="AEN368" +></A +>parseResponseFile</H3 +><DIV +CLASS="FUNCSYNOPSIS" +><A +NAME="AEN370" +></A +><P +></P +><P +><CODE +><CODE +CLASS="FUNCDEF" +>$response=$msg->parseResponseFile</CODE +>($fileHandle);</CODE +></P +><P +></P +></DIV +><P +>Given an incoming XML-RPC server response on the file handle + <TT +CLASS="PARAMETER" +><I +>$fileHandle</I +></TT +>, this method reads the + data and passes it to <TT +CLASS="FUNCTION" +>parseResponse</TT +> + </P +><P +> This method is useful to construct responses from + pre-prepared files (see files <TT +CLASS="LITERAL" +>demo1.txt, demo2.txt, + demo3.txt</TT +> in this distribution). It processes + any HTTP headers it finds. + </P +></DIV +></DIV +></DIV +><DIV +CLASS="NAVFOOTER" +><HR +ALIGN="LEFT" +WIDTH="100%"><TABLE +SUMMARY="Footer navigation table" +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +><A +HREF="apidocs.html" +ACCESSKEY="P" +>Prev</A +></TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +><A +HREF="index.html" +ACCESSKEY="H" +>Home</A +></TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +><A +HREF="xmlrpcresp.html" +ACCESSKEY="N" +>Next</A +></TD +></TR +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +>Class documentation</TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +><A +HREF="apidocs.html" +ACCESSKEY="U" +>Up</A +></TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +>xmlrpcresp</TD +></TR +></TABLE +></DIV +></BODY +></HTML +>
\ No newline at end of file |