CVS update: php3/doc/functions

From: Date: Tue, 02 Feb 1999 06:49:55 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-3839@lists.php.net to get a copy of this message
Date: Tuesday February 2, 1999 @ 1:49 Author: eschmid Update of /repository/php3/doc/functions In directory asf:/u/temp/cvs-serv8056 Modified Files: wddx.sgml Log Message: Reduced the warnings to zero. Index: php3/doc/functions/wddx.sgml diff -c php3/doc/functions/wddx.sgml:1.1 php3/doc/functions/wddx.sgml:1.2 *** php3/doc/functions/wddx.sgml:1.1 Tue Feb 2 00:44:11 1999 --- php3/doc/functions/wddx.sgml Tue Feb 2 01:49:54 1999 *************** *** 4,39 **** <partintro> <para> ! These functions are intended for work with <ulink url="&url.wddx;">WDDX</ulink>. <para> ! Note that all the functions that serialize variables use the first element of an ! array to determine whether the array is to be serialized into an array or structure. ! If the first element has string key, then it is serialized into a structure, otherwise, ! into an array. ! ! <refsect1> ! <title>Examples</title> ! <para> ! <example> ! <title>Serializing a single value</title> ! <programlisting> &lt;?php print wddx_serialize_value("PHP to WDDX packet example", "PHP packet"); ?&gt; ! </programlisting> ! </example> ! <para> ! This example will produce: ! <programlisting> &lt;wddxPacket version='0.9'&gt;&lt;header comment='PHP packet'/&gt;&lt;data&gt; &lt;string&gt;PHP to WDDX packet example&lt;/string&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> ! <example> ! <title>Using incremental packets</title> ! <programlisting> &lt;?php $pi = 3.1415926; $packet_id = wddx_packet_start("PHP"); --- 4,40 ---- <partintro> <para> ! These functions are intended for work with <ulink ! url="&url.wddx;">WDDX</ulink>. <para> ! Note that all the functions that serialize variables use the first ! element of an array to determine whether the array is to be ! serialized into an array or structure. If the first element has ! string key, then it is serialized into a structure, otherwise, ! into an array. ! ! <example> ! <title>Serializing a single value</title> ! <programlisting role="php"> &lt;?php print wddx_serialize_value("PHP to WDDX packet example", "PHP packet"); ?&gt; ! </programlisting> ! </example> ! <para> ! This example will produce: ! <informalexample> ! <programlisting role="php"> &lt;wddxPacket version='0.9'&gt;&lt;header comment='PHP packet'/&gt;&lt;data&gt; &lt;string&gt;PHP to WDDX packet example&lt;/string&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> ! </informalexample> ! <example> ! <title>Using incremental packets</title> ! <programlisting role="php"> &lt;?php $pi = 3.1415926; $packet_id = wddx_packet_start("PHP"); *************** *** 46,66 **** $packet = wddx_packet_end($packet_id); print $packet; ?&gt; ! </programlisting> ! </example> ! <para> ! This example will produce: ! <programlisting> &lt;wddxPacket version='0.9'&gt;&lt;header comment='PHP'/&gt;&lt;data&gt;&lt;struct&gt; &lt;var name='pi'&gt;&lt;number&gt;3.1415926&lt;/number&gt;&lt;/var&gt;&lt;var name='cities'&gt; &lt;array length='3'&gt;&lt;string&gt;Austin&lt;/string&gt;&lt;string&gt;Novato&lt;/string&gt; &lt;string&gt;Seattle&lt;/string&gt;&lt;/array&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> ! </refsect1> </partintro> ! <refentry id="function.wddx_serialize_value"> <refnamediv> <refname>wddx_serialize_value</refname> <refpurpose>Serialize a single value into a WDDX packet</refpurpose> --- 47,69 ---- $packet = wddx_packet_end($packet_id); print $packet; ?&gt; ! </programlisting> ! </example> ! <para> ! This example will produce: ! ! <informalexample> ! <programlisting role="php"> &lt;wddxPacket version='0.9'&gt;&lt;header comment='PHP'/&gt;&lt;data&gt;&lt;struct&gt; &lt;var name='pi'&gt;&lt;number&gt;3.1415926&lt;/number&gt;&lt;/var&gt;&lt;var name='cities'&gt; &lt;array length='3'&gt;&lt;string&gt;Austin&lt;/string&gt;&lt;string&gt;Novato&lt;/string&gt; &lt;string&gt;Seattle&lt;/string&gt;&lt;/array&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> ! </informalexample> </partintro> ! <refentry id="function.wddx-serialize-value"> <refnamediv> <refname>wddx_serialize_value</refname> <refpurpose>Serialize a single value into a WDDX packet</refpurpose> *************** *** 68,88 **** <refsect1> <title>Description</title> <funcsynopsis> ! <funcdef>string <function>wddx_serialize_value</function></funcdef> <paramdef>mixed <parameter>var</parameter></paramdef> ! <paramdef>string <parameter><optional>comment</optional></parameter></paramdef> </funcsynopsis> ! <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. </refsect1> </refentry> ! <refentry id="function.wddx_serialize_vars"> <refnamediv> <refname>wddx_serialize_vars</refname> <refpurpose>Serialize variables into a WDDX packet</refpurpose> --- 71,94 ---- <refsect1> <title>Description</title> <funcsynopsis> ! <funcdef>string ! <function>wddx_serialize_value</function></funcdef> <paramdef>mixed <parameter>var</parameter></paramdef> ! <paramdef>string ! <parameter><optional>comment</optional></parameter></paramdef> </funcsynopsis> ! <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. </refsect1> </refentry> ! <refentry id="function.wddx-serialize-vars"> <refnamediv> <refname>wddx_serialize_vars</refname> <refpurpose>Serialize variables into a WDDX packet</refpurpose> *************** *** 91,112 **** <title>Description</title> <funcsynopsis> <funcdef>string <function>wddx_serialize_vars</function></funcdef> ! <paramdef>...</paramdef> </funcsynopsis> ! <para> ! <function>wddx_serialize_vars</function> is used to create a WDDX packet with a structure ! that contains the serialized representation of the passed variables. ! <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. ! <para> ! <example> ! <title>wddx_serialize_vars example</title> ! <programlisting> &lt;?php $a = 1; $b = 5.5; --- 97,120 ---- <title>Description</title> <funcsynopsis> <funcdef>string <function>wddx_serialize_vars</function></funcdef> ! <paramdef>void </paramdef> </funcsynopsis> ! <para> ! <function>wddx_serialize_vars</function> is used to create a WDDX ! packet with a structure that contains the serialized ! representation of the passed variables. ! <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. ! <para> ! <example> ! <title>wddx_serialize_vars example</title> ! <programlisting> &lt;?php $a = 1; $b = 5.5; *************** *** 116,137 **** $clvars = array("c", "d"); print wddx_serialize_vars("a", "b", $clvars); ?&gt; ! </programlisting> ! </example> ! <para> ! The above example will produce: ! <programlisting> &lt;wddxPacket version='0.9'&gt;&lt;header/&gt;&lt;data&gt;&lt;struct&gt;&lt;var name='a'&gt;&lt;number&gt;1&lt;/number&gt;&lt;/var&gt; &lt;var name='b'&gt;&lt;number&gt;5.5&lt;/number&gt;&lt;/var&gt;&lt;var name='c'&gt;&lt;array length='3'&gt; &lt;string&gt;blue&lt;/string&gt;&lt;string&gt;orange&lt;/string&gt;&lt;string&gt;violet&lt;/string&gt;&lt;/array&gt;&lt;/var&gt; &lt;var name='d'&gt;&lt;string&gt;colors&lt;/string&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> </refsect1> </refentry> ! <refentry id="function.wddx_packet_start"> <refnamediv> <refname>wddx_packet_start</refname> <refpurpose>Starts a new WDDX packet with structure inside it</refpurpose> --- 124,145 ---- $clvars = array("c", "d"); print wddx_serialize_vars("a", "b", $clvars); ?&gt; ! </programlisting> ! </example> ! <para> ! The above example will produce: ! <programlisting> &lt;wddxPacket version='0.9'&gt;&lt;header/&gt;&lt;data&gt;&lt;struct&gt;&lt;var name='a'&gt;&lt;number&gt;1&lt;/number&gt;&lt;/var&gt; &lt;var name='b'&gt;&lt;number&gt;5.5&lt;/number&gt;&lt;/var&gt;&lt;var name='c'&gt;&lt;array length='3'&gt; &lt;string&gt;blue&lt;/string&gt;&lt;string&gt;orange&lt;/string&gt;&lt;string&gt;violet&lt;/string&gt;&lt;/array&gt;&lt;/var&gt; &lt;var name='d'&gt;&lt;string&gt;colors&lt;/string&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt; ! </programlisting> </refsect1> </refentry> ! <refentry id="function.wddx-packet-start"> <refnamediv> <refname>wddx_packet_start</refname> <refpurpose>Starts a new WDDX packet with structure inside it</refpurpose> *************** *** 140,158 **** <title>Description</title> <funcsynopsis> <funcdef>int <function>wddx_packet_start</function></funcdef> ! <paramdef>string <parameter><optional>comment</optional></parameter></paramdef> </funcsynopsis> ! <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. </refsect1> </refentry> ! <refentry id="function.wddx_packet_end"> <refnamediv> <refname>wddx_packet_end</refname> <refpurpose>Ends a WDDX packet with the specified ID</refpurpose> --- 148,168 ---- <title>Description</title> <funcsynopsis> <funcdef>int <function>wddx_packet_start</function></funcdef> ! <paramdef>string ! <parameter><optional>comment</optional></parameter></paramdef> </funcsynopsis> ! <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. </refsect1> </refentry> ! <refentry id="function.wddx-packet-end"> <refnamediv> <refname>wddx_packet_end</refname> <refpurpose>Ends a WDDX packet with the specified ID</refpurpose> *************** *** 161,177 **** <title>Description</title> <funcsynopsis> <funcdef>int <function>wddx_packet_end</function></funcdef> ! <paramdef>int <parameter>packet_id</parameter></paramdef> </funcsynopsis> ! <para> ! <function>wddx_packet_end</function> ends the WDDX packet specified by the ! <parameter>packet_id</parameter> and returns the string with the packet. </refsect1> </refentry> ! <refentry id="function.wddx_add_vars"> <refnamediv> <refname>wddx_add_vars</refname> <refpurpose>Ends a WDDX packet with the specified ID</refpurpose> --- 171,188 ---- <title>Description</title> <funcsynopsis> <funcdef>int <function>wddx_packet_end</function></funcdef> ! <paramdef>int <parameter>packet_id</parameter></paramdef> </funcsynopsis> ! <para> ! <function>wddx_packet_end</function> ends the WDDX packet ! specified by the <parameter>packet_id</parameter> and returns the ! string with the packet. </refsect1> </refentry> ! <refentry id="function.wddx-add-vars"> <refnamediv> <refname>wddx_add_vars</refname> <refpurpose>Ends a WDDX packet with the specified ID</refpurpose> *************** *** 180,199 **** <title>Description</title> <funcsynopsis> <funcdef><function>wddx_add_vars</function></funcdef> ! <paramdef>int <parameter>packet_id</parameter></paramdef> ! <paramdef>...</paramdef> </funcsynopsis> ! <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>. </refsect1> </refentry> ! <refentry id="function.wddx_deserialize"> <refnamediv> <refname>wddx_deserialize</refname> <refpurpose>Deserializes a WDDX packet</refpurpose> --- 191,211 ---- <title>Description</title> <funcsynopsis> <funcdef><function>wddx_add_vars</function></funcdef> ! <paramdef>int <parameter>packet_id</parameter></paramdef> ! <paramdef>...</paramdef> </funcsynopsis> ! <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>. </refsect1> </refentry> ! <refentry id="function.wddx-deserialize"> <refnamediv> <refname>wddx_deserialize</refname> <refpurpose>Deserializes a WDDX packet</refpurpose> *************** *** 202,214 **** <title>Description</title> <funcsynopsis> <funcdef>mixed <function>wddx_deserialize</function></funcdef> ! <paramdef>string <parameter>packet</parameter></paramdef> </funcsynopsis> ! <para> ! <function>wddx_deserialized</function> takes a <parameter>packet</string> string ! and deserializes it. It returns the result which can be string, number, or array. ! Note that structures are deserialized into associative arrays. </refsect1> </refentry> --- 214,227 ---- <title>Description</title> <funcsynopsis> <funcdef>mixed <function>wddx_deserialize</function></funcdef> ! <paramdef>string <parameter>packet</parameter></paramdef> </funcsynopsis> ! <para> ! <function>wddx_deserialized</function> takes a ! <parameter>packet</parameter> string and deserializes it. It ! returns the result which can be string, number, or array. Note ! that structures are deserialized into associative arrays. </refsect1> </refentry> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3839) next »