mirror of
https://github.com/php/doc-fr.git
synced 2026-03-24 07:02:06 +01:00
144 lines
4.6 KiB
XML
144 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: fe4e8b87d18f17394e7177917c498774b062448c Maintainer: jpauli Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="soapserver.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SoapServer::__construct</refname>
|
|
<refpurpose>Constructeur SoapServer</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<constructorsynopsis role="SoapServer">
|
|
<modifier>public</modifier> <methodname>SoapServer::__construct</methodname>
|
|
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>wsdl</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
|
|
</constructorsynopsis>
|
|
<para>
|
|
Ce constructeur permet la création d'objets <classname>SoapServer</classname>
|
|
en mode WSDL ou non-WSDL.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>wsdl</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Pour utiliser le mode WSDL, il faut définir l'URI du fichier
|
|
WSDL dans ce paramètre. Avec les autres situations, il faut définir
|
|
ce paramètre à &null; et définir l'option <literal>uri</literal>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Permet de définir une version SOAP par défaut (<literal>soap_version</literal>),
|
|
un jeu de caractères d'encodage interne (<literal>encoding</literal>)
|
|
et un URI acteur (<literal>actor</literal>).
|
|
</para>
|
|
<para>
|
|
L'option <literal>classmap</literal> peut être utilisée pour lier
|
|
quelques types WSDL à des classes PHP. Cette option doit être un
|
|
tableau avec les types WSDL en tant que clés et les noms des classes PHP
|
|
en tant que valeurs.
|
|
</para>
|
|
<para>
|
|
L'option <literal>typemap</literal> est un tableau dont les clés sont
|
|
<literal>type_name</literal>, <literal>type_ns</literal> (URI du namespace),
|
|
<literal>from_xml</literal> (fonction de rappel acceptant un paramètre de type &string;) et
|
|
<literal>to_xml</literal> (fonction de rappel acceptant un paramètre de type &object;).
|
|
</para>
|
|
<para>
|
|
L'option <literal>cache_wsdl</literal> prend une des valeurs
|
|
<constant>WSDL_CACHE_NONE</constant>,
|
|
<constant>WSDL_CACHE_DISK</constant>,
|
|
<constant>WSDL_CACHE_MEMORY</constant> ou
|
|
<constant>WSDL_CACHE_BOTH</constant>.
|
|
</para>
|
|
<para>
|
|
La dernière option est <literal>features</literal>
|
|
qui peut être définie à
|
|
<constant>SOAP_WAIT_ONE_WAY_CALLS</constant>,
|
|
<constant>SOAP_SINGLE_ELEMENT_ARRAYS</constant>,
|
|
<constant>SOAP_USE_XSI_ARRAY_TYPE</constant>.
|
|
</para>
|
|
<para>
|
|
L'option <literal>send_errors</literal> peut être définie à &false; pour envoyer
|
|
un message d'erreur générique ("Internal error") au lieu du message d'erreur
|
|
spécifique.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemples avec <function>SoapServer::__construct</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$server = new SoapServer("some.wsdl");
|
|
|
|
$server = new SoapServer("some.wsdl", array('soap_version' => SOAP_1_2));
|
|
|
|
$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C"));
|
|
|
|
$server = new SoapServer("some.wsdl", array('encoding'=>'ISO-8859-1'));
|
|
|
|
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
|
|
|
|
class MyBook {
|
|
public $title;
|
|
public $author;
|
|
}
|
|
|
|
$server = new SoapServer("books.wsdl", array('classmap' => array('book' => "MyBook")));
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>SoapClient::__construct</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
|
|
-->
|