mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
34 lines
7.1 KiB
HTML
34 lines
7.1 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>xmlrpcresp</title><link rel="stylesheet" href="xmlrpc.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="index.html" title="XML-RPC for PHP" /><link rel="up" href="ch07.html" title="Chapter 7. Class documentation" /><link rel="prev" href="ch07s03.html" title="xmlrpc_client" /><link rel="next" href="ch07s05.html" title="xmlrpc_server" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">xmlrpcresp</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch07s03.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Class documentation</th><td width="20%" align="right"> <a accesskey="n" href="ch07s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="xmlrpcresp"></a>xmlrpcresp</h2></div></div></div><p>This class is used to contain responses to XML-RPC requests. A
|
||
server method handler will construct an
|
||
<code class="classname">xmlrpcresp</code> and pass it as a return value. This
|
||
same value will be returned by the result of an invocation of the
|
||
<code class="function">send</code> method of the
|
||
<code class="classname">xmlrpc_client</code> class.</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id935884"></a>Creation</h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">xmlrpcrespnew
|
||
<b class="fsfunc">xmlrpcresp</b>(</code></td><td>xmlrpcval<var class="pdparam">$xmlrpcval</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">xmlrpcrespnew
|
||
<b class="fsfunc">xmlrpcresp</b>(</code></td><td><var class="pdparam">0</var>, </td></tr><tr><td> </td><td>int<var class="pdparam">$errcode</var>, </td></tr><tr><td> </td><td>string<var class="pdparam">$err_string</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>The first syntax is used when execution has happened without
|
||
difficulty: <em class="parameter"><code>$xmlrpcval</code></em> is an
|
||
<code class="classname">xmlrpcval</code> value with the result of the method
|
||
execution contained in it. Alternatively it can be a string containing
|
||
the xml serialization of the single xml-rpc value result of method
|
||
execution.</p><p>The second type of constructor is used in case of failure.
|
||
<em class="parameter"><code>errcode</code></em> and <em class="parameter"><code>err_string</code></em>
|
||
are used to provide indication of what has gone wrong. See <a class="xref" href="ch07s05.html" title="xmlrpc_server">xmlrpc_server</a> for more information on passing error
|
||
codes.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id935971"></a>Methods</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id935977"></a>faultCode</h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">int<b class="fsfunc">faultCode</b>(</code></td><td><code>void)</code>;</td><td> </td></tr></table><div class="funcprototype-spacer"> </div></div><p>Returns the integer fault code return from the XML-RPC
|
||
response. A zero value indicates success, any other value indicates
|
||
a failure response.</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id936004"></a>faultString</h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">string<b class="fsfunc">faultString</b>(</code></td><td><code>void)</code>;</td><td> </td></tr></table><div class="funcprototype-spacer"> </div></div><p>Returns the human readable explanation of the fault indicated
|
||
by <code class="function">$resp->faultCode</code>().</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id936036"></a>value</h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">xmlrpcval<b class="fsfunc">value</b>(</code></td><td><code>void)</code>;</td><td> </td></tr></table><div class="funcprototype-spacer"> </div></div><p>Returns an <code class="classname">xmlrpcval</code> object containing
|
||
the return value sent by the server. If the response's
|
||
<code class="function">faultCode</code> is non-zero then the value returned
|
||
by this method should not be used (it may not even be an
|
||
object).</p><p>Note: if the xmlrpcresp instance in question has been created
|
||
by an <code class="classname">xmlrpc_client</code> object whose
|
||
<code class="varname">return_type</code> was set to 'phpvals', then a plain
|
||
php value will be returned instead of an
|
||
<code class="classname">xmlrpcval</code> object. If the
|
||
<code class="varname">return_type</code> was set to 'xml', an xml string will
|
||
be returned (see the return_type member var above for more
|
||
details).</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id936088"></a>serialize</h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">string<b class="fsfunc">serialize</b>(</code></td><td><code>void)</code>;</td><td> </td></tr></table><div class="funcprototype-spacer"> </div></div><p>Returns an XML string representation of the response (xml
|
||
prologue not included).</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch07s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch07s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">xmlrpc_client </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> xmlrpc_server</td></tr></table></div></body></html>
|