setMulti* docs.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@275117 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Andrei Zmievski 2009-02-03 19:37:15 +00:00
parent b2a101c786
commit dfc350e8c5
2 changed files with 40 additions and 48 deletions

View file

@ -1,21 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry xml:id="memcached.setmulti" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::setMulti</refname>
<refpurpose>The setMulti purpose</refpurpose>
<refpurpose>Store multiple sets of data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Memcached::setMulti</methodname>
<modifier>public</modifier> <type>bool</type><methodname>Memcached::setMulti</methodname>
<methodparam><type>array</type><parameter>entries</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
</methodsynopsis>
<para>
The method description goes here.
<function>Memcached::setMulti</function> is similar to
<methodname>Memcached::set</methodname>, but instead of a single key/value
pair, it works on multiple sets specified in
<parameter>entries</parameter>. The <parameter>expiration</parameter>
time applies to all the entries at once.
</para>
</refsect1>
@ -27,7 +31,7 @@
<term><parameter>entries</parameter></term>
<listitem>
<para>
Description...
An array of key/value pairs to store on the server.
</para>
</listitem>
</varlistentry>
@ -35,7 +39,7 @@
<term><parameter>expiration</parameter></term>
<listitem>
<para>
Description...
The expiration time of the entries, as a Unix timestamp.
</para>
</listitem>
</varlistentry>
@ -46,7 +50,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Description...
&return.success;
Use <methodname>Memcached::getResultCode</methodname> if necessary.
</para>
</refsect1>
@ -58,16 +63,18 @@
<programlisting role="php">
<![CDATA[
<?php
/* ... */
$m = new Memcached();
$m->addServer('localhost', 11211);
$entries = array(
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3'
);
$m->set($entries, time() + 300);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</para>
</refsect1>
@ -76,7 +83,8 @@
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>Classname::Method</methodname></member>
<member><methodname>Memcached::setMultiByKey</methodname></member>
<member><methodname>Memcached::set</methodname></member>
</simplelist>
</para>
</refsect1>

View file

@ -1,22 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry xml:id="memcached.setmultibykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::setMultiByKey</refname>
<refpurpose>The setMultiByKey purpose</refpurpose>
<refpurpose>Store multiple sets of data on a specific server</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Memcached::setMultiByKey</methodname>
<modifier>public</modifier> <type>bool</type><methodname>Memcached::setMultiByKey</methodname>
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
<methodparam><type>array</type><parameter>entries</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
</methodsynopsis>
<para>
The method description goes here.
<function>Memcached::setMultiByKey</function> is functionally equivalent to
<methodname>Memcached::setMulti</methodname>, except that the free-form
<parameter>server_key</parameter> can be used to map the keys from
<parameter>entries</parameter> to a specific server. This is useful if you
need to keep a bunch of related keys on a certain server.
</para>
</refsect1>
@ -28,7 +32,7 @@
<term><parameter>server_key</parameter></term>
<listitem>
<para>
Description...
The key identifying the server to store the items on.
</para>
</listitem>
</varlistentry>
@ -36,7 +40,7 @@
<term><parameter>entries</parameter></term>
<listitem>
<para>
Description...
An array of key/value pairs to store on the server.
</para>
</listitem>
</varlistentry>
@ -44,7 +48,7 @@
<term><parameter>expiration</parameter></term>
<listitem>
<para>
Description...
The expiration time of the entries, as a Unix timestamp.
</para>
</listitem>
</varlistentry>
@ -55,29 +59,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Description...
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>Memcached::setMultiByKey</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
&return.success;
Use <methodname>Memcached::getResultCode</methodname> if necessary.
</para>
</refsect1>
@ -85,7 +68,8 @@
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>Classname::Method</methodname></member>
<member><methodname>Memcached::setMulti</methodname></member>
<member><methodname>Memcached::set</methodname></member>
</simplelist>
</para>
</refsect1>