This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/thirdparty/xmlrpc-2.2/doc/ch10s03.html

8 lines
3.2 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>3.&nbsp;system.methodSignature</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="ch10.html" title="Chapter&nbsp;10.&nbsp;Reserved methods"><link rel="prev" href="ch10s02.html" title="2.&nbsp;system.listMethods"><link rel="next" href="ch10s04.html" title="4.&nbsp;system.methodHelp"></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">3.&nbsp;system.methodSignature</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch10s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;10.&nbsp;Reserved methods</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch10s04.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="sysmethodsig"></a>3.&nbsp;system.methodSignature</h2></div></div></div><p>This method takes one parameter, the name of a method implemented by the XML-RPC server.</p><p>It returns an array of possible signatures for this method. A signature is an array of types. The first of these types is the return type of the method, the rest are parameters.</p><p>Multiple signatures (i.e. overloading) are permitted: this is the reason that an array of signatures are returned by this method.</p><p>Signatures themselves are restricted to the top level parameters expected by a method. For instance if a method expects one array of structs as a parameter, and it returns a string, its signature is simply "string, array". If it expects three integers, its signature is "string, int, int, int".</p><p>For parameters that can be of more than one type, the "undefined" string is supported.</p><p>If no signature is defined for the method, a not-array value is returned. Therefore this is the way to test for a non-signature, if <em class="parameter"><code>$resp</code></em> below is the response object from a method call to <code class="function">system.methodSignature</code>:</p><pre class="programlisting">
$v = $resp-&gt;value();
if ($v-&gt;kindOf() != "array") {
// then the method did not have a signature defined
}
</pre><p>See the <code class="filename">introspect.php</code> demo included in this distribution for an example of using this method.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch10s02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch10.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch10s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;system.listMethods&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;system.methodHelp</td></tr></table></div></body></html>