git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
8 lines
3.2 KiB
HTML
8 lines
3.2 KiB
HTML
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>3. 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 10. Reserved methods"><link rel="prev" href="ch10s02.html" title="2. system.listMethods"><link rel="next" href="ch10s04.html" title="4. 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. system.methodSignature</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch10s02.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Reserved methods</th><td width="20%" align="right"> <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. 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->value();
|
|
if ($v->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> </td><td width="20%" align="center"><a accesskey="u" href="ch10.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch10s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. system.listMethods </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4. system.methodHelp</td></tr></table></div></body></html> |