3 lines
7.0 KiB
HTML
3 lines
7.0 KiB
HTML
|
|
<html><head>
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
|
<title>4. xmlrpcresp</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" 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="3. xmlrpc_client"><link rel="next" href="ch07s05.html" title="5. xmlrpc_server"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4. 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"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmlrpcresp"></a>4. 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"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2262"></a>4.1. Creation</h3></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">$resp = new xmlrpcresp(</code></td><td><var class="pdparam">$xmlrpcval</var><code>)</code>;</td><td> </td></tr></table><table border="0" summary="Function argument synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code>xmlrpcval</code> </td><td><code><var class="pdparam">$xmlrpcval</var>;</code></td></tr></table><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">$resp = new xmlrpcresp(</code></td><td><var class="pdparam">0</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">$errcode</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">$err_string</var><code>)</code>;</td><td> </td></tr></table><table border="0" summary="Function argument synopsis" cellspacing="0" cellpadding="0"><tr><td><code></code> </td><td><code><var class="pdparam">0</var>;</code></td></tr><tr><td><code>int</code> </td><td><code><var class="pdparam">$errcode</var>;</code></td></tr><tr><td><code>string</code> </td><td><code><var class="pdparam">$err_string</var>;</code></td></tr></table></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 href="ch07s05.html">xmlrpc_server</a> for more information on passing error codes.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e2308"></a>4.2. Methods</h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="d0e2311"></a>4.2.1. faultCode</h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr><td><code class="funcdef">$fn = $resp->faultCode(</code></td><td><
|