ref.wddx: switch to new style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229085 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-02-06 00:35:36 +00:00
parent ffcef596f0
commit 76d134f188
6 changed files with 213 additions and 60 deletions

View file

@ -1,25 +1,61 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.wddx-add-vars">
<refnamediv>
<refname>wddx_add_vars</refname>
<refpurpose>Add variables to a WDDX packet with the specified ID</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>wddx_add_vars</methodname>
<methodparam><type>int</type><parameter>packet_id</parameter></methodparam>
<methodparam><type>mixed</type><parameter>name_var</parameter></methodparam>
<methodparam><type>resource</type><parameter>packet_id</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var_name</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>wddx_add_vars</function> is used to serialize passed
variables and add the result to the packet specified by the
<parameter>packet_id</parameter>. The variables to be serialized
are specified in exactly the same way as
<function>wddx_serialize_vars</function>.
Serializes the passed variables and add the result to the fiven packet.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
This function takes a variable number of parameters.
<variablelist>
<varlistentry>
<term><parameter>packet_id</parameter></term>
<listitem>
<para>
A WDDX packet, returned by <function>wddx_packet_start</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>var_name</parameter></term>
<listitem>
<para>
Can be either a string naming a variable or an array containing
strings naming the variables or another array, etc.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
</refentry>

View file

@ -1,21 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.wddx-packet-end">
<refnamediv>
<refname>wddx_packet_end</refname>
<refpurpose>Ends a WDDX packet with the specified ID</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>wddx_packet_end</methodname>
<methodparam><type>resource</type><parameter>packet_id</parameter></methodparam>
</methodsynopsis>
<para>
<function>wddx_packet_end</function> ends the WDDX packet
specified by the <parameter>packet_id</parameter> and returns the
string with the packet.
Ends and returns the given WDDX packet.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>packet_id</parameter></term>
<listitem>
<para>
A WDDX packet, returned by <function>wddx_packet_start</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the string containing the WDDX packet.
</para>
</refsect1>
</refentry>

View file

@ -1,23 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.wddx-packet-start">
<refnamediv>
<refname>wddx_packet_start</refname>
<refpurpose>Starts a new WDDX packet with structure inside it</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>wddx_packet_start</methodname>
<methodparam choice="opt"><type>string</type><parameter>comment</parameter></methodparam>
</methodsynopsis>
<para>
Use <function>wddx_packet_start</function> to start a new WDDX
packet for incremental addition of variables. It takes an
optional <parameter>comment</parameter> string and returns a
packet ID for use in later functions. It automatically creates a
structure definition inside the packet to contain the variables.
Start a new WDDX packet for incremental addition of variables.
It automatically creates a structure definition inside the packet to
contain the variables.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>comment</parameter></term>
<listitem>
<para>
An optional comment string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a packet ID for use in later functions, or &false; on error.
</para>
</refsect1>
</refentry>

View file

@ -1,24 +1,51 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.wddx-serialize-value">
<refnamediv>
<refname>wddx_serialize_value</refname>
<refpurpose>Serialize a single value into a WDDX packet</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>wddx_serialize_value</methodname>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>comment</parameter></methodparam>
</methodsynopsis>
<para>
<function>wddx_serialize_value</function> is used to create a
WDDX packet from a single given value. It takes the value
contained in <parameter>var</parameter>, and an optional
<parameter>comment</parameter> string that appears in the packet
header, and returns the WDDX packet.
Creates a WDDX packet from a single given value.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>var</parameter></term>
<listitem>
<para>
The value to be serialized
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>comment</parameter></term>
<listitem>
<para>
An optional comment string that appears in the packet header.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the WDDX packet, or &false; on error.
</para>
</refsect1>
</refentry>

View file

@ -1,29 +1,58 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.wddx-serialize-vars">
<refnamediv>
<refname>wddx_serialize_vars</refname>
<refpurpose>Serialize variables into a WDDX packet</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>wddx_serialize_vars</methodname>
<methodparam><type>mixed</type><parameter>var_name</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
<function>wddx_serialize_vars</function> is used to create a WDDX
packet with a structure that contains the serialized
Creates a WDDX packet with a structure that contains the serialized
representation of the passed variables.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<function>wddx_serialize_vars</function> takes a variable number
of arguments, each of which can be either a string naming a
variable or an array containing strings naming the variables or
another array, etc.
This function takes a variable number of parameters.
<variablelist>
<varlistentry>
<term><parameter>var_name</parameter></term>
<listitem>
<para>
Can be either a string naming a variable or an array containing
strings naming the variables or another array, etc.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the WDDX packet, or &false; on error.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>wddx_serialize_vars</function> example</title>
@ -40,18 +69,16 @@ echo wddx_serialize_vars("a", "b", $clvars);
?>
]]>
</programlisting>
</example>
</para>
<para>
The above example will produce:
<screen>
&example.outputs;
<screen>
<![CDATA[
<wddxPacket version='1.0'><header/><data><struct><var name='a'><number>1</number></var>
<var name='b'><number>5.5</number></var><var name='c'><array length='3'>
<string>blue</string><string>orange</string><string>violet</string></array></var>
<var name='d'><string>colors</string></var></struct></data></wddxPacket>
]]>
</screen>
</screen>
</example>
</para>
</refsect1>
</refentry>

View file

@ -1,22 +1,43 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/wddx.xml, last change in rev 1.2 -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.wddx-unserialize">
<refnamediv>
<refname>wddx_unserialize</refname>
<refpurpose>Unserializes a WDDX packet</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>wddx_unserialize</methodname>
<methodparam><type>string</type><parameter>packet</parameter></methodparam>
</methodsynopsis>
<para>
<function>wddx_unserialize</function> takes a
<parameter>packet</parameter> string and unserializes it. It
returns the result which can be string, number, or array. Note
that structures are unserialized into associative arrays.
Unserializes a WDDX <parameter>packet</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>packet</parameter></term>
<listitem>
<para>
A WDDX packet, as a string or stream.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the unserialized value which can be a string, a number or an
array. Note that structures are unserialized into associative arrays.
</para>
</refsect1>
</refentry>