2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00
Files
CATI_Tool/include/limesurvey/admin/classes/xmlrpc/doc/ch10s03.html
2011-11-14 04:27:30 +00:00

20 lines
3.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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>system.methodSignature</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="ch10.html" title="Chapter 10. Reserved methods" /><link rel="prev" href="ch10s02.html" title="system.listMethods" /><link rel="next" href="ch10s04.html" title="system.methodHelp" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">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" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sysmethodsig"></a>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"><code><span style="color: #000000">
<span style="color: #0000BB">$v&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$resp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">value</span><span style="color: #007700">();<br />if&nbsp;(</span><span style="color: #0000BB">$v</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">kindOf</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #DD0000">"array"</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;then&nbsp;the&nbsp;method&nbsp;did&nbsp;not&nbsp;have&nbsp;a&nbsp;signature&nbsp;defined<br /></span><span style="color: #007700">}</span>
</span>
</code></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">system.listMethods </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> system.methodHelp</td></tr></table></div></body></html>