1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
|
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.7 Maintainer: goba Status: ready -->
<reference id="ref.wddx">
<title>WDDX fggvnyek</title>
<titleabbrev>WDDX</titleabbrev>
<partintro>
<para>
Ezek a fggvnyek a <ulink url="&url.wddx;">WDDX</ulink>-el
dolgoznak.
</para>
<para>
Ahhoz, hogy hasznlhasd a WDDX-et, teleptened kell az expat
programknyvtrat (ami az Apache 1.3.7 vagy ksbbi verzik
rsze) s jra kell fordtanod a PHP-t a
<option role="configure">--with-xml</option> s
<option role="configure">--enable-wddx</option> paramterekkel.
</para>
<para>
Figyelj arra, hogy minden vltozkat stringg alakt fggvny
az tadott tmb els elemt ellenrzi, hogy megllaptsa,
hogy egy tmbt vagy egy struktrt lltson-e el. Ha az els
elem kulcsa string, akkor struktrt llt el, egybknt tmbt.
<example>
<title>Egyszer rtkek talaktsa</title>
<programlisting role="php">
<![CDATA[
<?php
print wddx_serialize_value("PHP to WDDX packet example", "PHP packet");
?>
]]>
</programlisting>
</example></para>
<para>
Ez a plda az albbi eredmnyt adja:
<informalexample>
<programlisting role="php">
<![CDATA[
<wddxPacket version='1.0'><header comment='PHP packet'/><data>
<string>PHP to WDDX packet example</string></data></wddxPacket>
]]>
</programlisting>
</informalexample>
<example>
<title>Bvthet csomagok</title>
<programlisting role="php">
<![CDATA[
<?php
$pi = 3.1415926;
$packet_id = wddx_packet_start("PHP");
wddx_add_vars($packet_id, "pi");
/* A $cities kpzeletben egy adatbzisbl szrmazik */
$cities = array("Austin", "Novato", "Seattle");
wddx_add_vars($packet_id, "cities");
$packet = wddx_packet_end($packet_id);
print $packet;
?>
]]>
</programlisting>
</example></para>
<para>
Ez a plda az albbi eredmnyt adja:
<informalexample>
<programlisting role="php">
<![CDATA[
<wddxPacket version='1.0'><header comment='PHP'/><data><struct>
<var name='pi'><number>3.1415926</number></var><var name='cities'>
<array length='3'><string>Austin</string><string>Novato</string>
<string>Seattle</string></array></var></struct></data></wddxPacket>
]]>
</programlisting>
</informalexample></para>
</partintro>
<refentry id="function.wddx-serialize-value">
<refnamediv>
<refname>wddx_serialize_value</refname>
<refpurpose>Egy egyedlll rtkbl WDDX csomagot llt el</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<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>
A <function>wddx_serialize_value</function> egy addott rtkbl llt
el egy WDDX csomagot. Veszi a <parameter>var</parameter> rtkt,
s az elhagyhat <parameter>comment</parameter> stringet ami a csomag
fejlcben jelenik meg, s visszaadja a WDDX csomagot.
</para>
</refsect1>
</refentry>
<refentry id="function.wddx-serialize-vars">
<refnamediv>
<refname>wddx_serialize_vars</refname>
<refpurpose>Vltozkat csomagol egy WDDX csomagba</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<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>
A <function>wddx_serialize_vars</function> az tadott
vltozk WDDX csomagg alaktsra hasznlhat.
</para>
<para>
A <function>wddx_serialize_vars</function> tetszleges
szm paramtert elfogad, amelyek kzl brmelyik lehet
egy string, ami egy vltoz nevt adja, vagy egy tmb,
ami vltoznevek tmbjt adja.
</para>
<para>
<example>
<title>wddx_serialize_vars plda</title>
<programlisting>
<![CDATA[
<?php
$a = 1;
$b = 5.5;
$c = array("blue", "orange", "violet");
$d = "colors";
$clvars = array("c", "d");
print wddx_serialize_vars("a", "b", $clvars);
?>
]]>
</programlisting>
</example></para>
<para>
Ez a plda az albbi eredmnyt adja:
<programlisting>
<![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>
]]>
</programlisting></para>
</refsect1>
</refentry>
<refentry id="function.wddx-packet-start">
<refnamediv>
<refname>wddx_packet_start</refname>
<refpurpose>Egy j WDDX csomagot kezd egy struktrval</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<methodsynopsis>
<type>int</type><methodname>wddx_packet_start</methodname>
<methodparam choice="opt"><type>string</type><parameter>comment</parameter></methodparam>
</methodsynopsis>
<para>
A <function>wddx_packet_start</function> egy j WDDX
csomagot kezd, amibe ksbb jabb vltozk helyezhetek. Van egy
elhagyhat <parameter>comment</parameter> string paramtere, s
ksbbi hasznlat cljra egy csomag azonostval tr vissza.
Automatikusan egy struktra defincit kezd a csomagban.
</para>
</refsect1>
</refentry>
<refentry id="function.wddx-packet-end">
<refnamediv>
<refname>wddx_packet_end</refname>
<refpurpose>Befejezi a megadott WDDX csomagot</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<methodsynopsis>
<type>string</type><methodname>wddx_packet_end</methodname>
<methodparam><type>int</type><parameter>packet_id</parameter></methodparam>
</methodsynopsis>
<para>
A <function>wddx_packet_end</function> befejezi a
<parameter>packet_id</parameter> paramterrel megadott
WDDX csomagot s visszatr a stringgel, ami a csomagot
tartalmazza.</para>
</refsect1>
</refentry>
<refentry id="function.wddx-add-vars">
<refnamediv>
<refname>wddx_add_vars</refname>
<refpurpose>Hozzad a megadott WDDX csomaghoz vltozkat</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<methodsynopsis>
<methodname>wddx_add_vars</methodname>
<methodparam><type>int</type><parameter>packet_id</parameter></methodparam>
<methodparam><type>mixed</type><parameter>name_var</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
A <function>wddx_add_vars</function> az tadott vltozk
<parameter>packet_id</parameter> ltal hivatkozott csomagba
helyezsre szolgl. A vltozkat pontosan gy kell
megadni, mint a <function>wddx_serialize_vars</function>
fggvny esetn.
</para>
</refsect1>
</refentry>
<refentry id="function.wddx-deserialize">
<refnamediv>
<refname>wddx_deserialize</refname>
<refpurpose>Kibont egy WDDX csomagot</refpurpose>
</refnamediv>
<refsect1>
<title>Lers</title>
<methodsynopsis>
<type>mixed</type><methodname>wddx_deserialize</methodname>
<methodparam><type>string</type><parameter>packet</parameter></methodparam>
</methodsynopsis>
<para>
A <function>wddx_deserialized</function> a kapott
<parameter>packet</parameter> csomagot felbontja. Visszaadja
az eredmnyt, ami egy string, szm vagy tmb. A struktrk
asszociatv tmbkk alakulnak!
</para>
</refsect1>
</refentry>
</reference>
<!-- 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:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
|