mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@303925 c90b9560-bf6c-de11-be94-00142212c4b1
123 lines
3.2 KiB
XML
123 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 28ac74c88c4852d494e9f513f81a19edf44dc577 Maintainer: yago Status: ready -->
|
|
<refentry xml:id="soapserver.addfunction" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SoapServer::addFunction</refname>
|
|
<refpurpose>Añade una o más funciones al controlador de peticiones SOAP</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>void</type><methodname>SoapServer::addFunction</methodname>
|
|
<methodparam><type>mixed</type><parameter>functions</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Exporta una o más funciones para clientes remotos
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>functions</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Para exportar una función, pasa el nombre de la función en su parámetro
|
|
como cadena.
|
|
</para>
|
|
<para>
|
|
Para exportar varias funciones, pasa un array con el nombre de las funciones.
|
|
</para>
|
|
<para>
|
|
Para exportar todas las funciones, pasa la constante especial <constant>SOAP_FUNCTIONS_ALL</constant>.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Las <parameter>functions</parameter> deben recibir todos los argumentos de entrada en el mismo
|
|
orden que fueron definidos en el fichero WSDL (no deberían recibir ningún parámetro de salida
|
|
como argumento) y devolver uno o más valores. Para devolver varios valores deben devolver
|
|
un array con los nombrados parámetros de salida.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.void;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplos de <function>SoapServer::addFunction</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
function echoString($inputString)
|
|
{
|
|
return $inputString;
|
|
}
|
|
|
|
$server->addFunction("echoString");
|
|
|
|
function echoTwoStrings($inputString1, $inputString2)
|
|
{
|
|
return array("outputString1" => $inputString1,
|
|
"outputString2" => $inputString2);
|
|
}
|
|
$server->addFunction(array("echoString", "echoTwoStrings"));
|
|
|
|
$server->addFunction(SOAP_FUNCTIONS_ALL);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>SoapServer::SoapServer</methodname></member>
|
|
<member><methodname>SoapServer::setClass</methodname></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|