cvs: phpdoc /en/reference/memcached/memcached replace.xml replacebykey.xml
| From: | Andrei Zmievski | Date: | Tue, 03 Feb 2009 19:12:56 +0000 |
| Subject: | cvs: phpdoc /en/reference/memcached/memcached replace.xml replacebykey.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3134@lists.php.net to get a copy of this message | ||
andrei Tue Feb 3 19:12:56 2009 UTC
Modified files:
/phpdoc/en/reference/memcached/memcached replace.xml
replacebykey.xml
Log:
replace* docs
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/memcached/memcached/replace.xml?r1=1.1&r2=1.2&diff_format=u
Index: phpdoc/en/reference/memcached/memcached/replace.xml
diff -u phpdoc/en/reference/memcached/memcached/replace.xml:1.1
phpdoc/en/reference/memcached/memcached/replace.xml:1.2
--- phpdoc/en/reference/memcached/memcached/replace.xml:1.1 Fri Jan 30 00:04:29 2009
+++ phpdoc/en/reference/memcached/memcached/replace.xml Tue Feb 3 19:12:56 2009
@@ -1,22 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry xml:id="memcached.replace" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::replace</refname>
- <refpurpose>The replace purpose</refpurpose>
+ <refpurpose>Replace data under an existing key</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier>
<type>void</type><methodname>Memcached::replace</methodname>
+ <modifier>public</modifier>
<type>bool</type><methodname>Memcached::replace</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
-
<methodparam><type>string</type><parameter>value</parameter></methodparam>
- <methodparam
choice="opt"><type>string</type><parameter>expiration</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
</methodsynopsis>
<para>
- The method description goes here.
+ <function>Memcached::replace</function> is similar to
+ <methodname>Memcached::set</methodname>, but the operation fails if the
+ <parameter>key</parameter> does not exist on the server.
</para>
</refsect1>
@@ -28,7 +30,7 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
- Description...
+ The key under which to store the value.
</para>
</listitem>
</varlistentry>
@@ -36,7 +38,7 @@
<term><parameter>value</parameter></term>
<listitem>
<para>
- Description...
+ The value to store.
</para>
</listitem>
</varlistentry>
@@ -44,7 +46,7 @@
<term><parameter>expiration</parameter></term>
<listitem>
<para>
- Description...
+ The expiration time of the value, as a Unix timestamp.
</para>
</listitem>
</varlistentry>
@@ -55,29 +57,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Description...
- </para>
- </refsect1>
-
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- <title><function>Memcached::replace</function> example</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-/* ... */
-?>
-]]>
- </programlisting>
- &example.outputs.similar;
- <screen>
-<![CDATA[
-...
-]]>
- </screen>
- </example>
+ &return.success;
+ The <methodname>Memcached::getResultCode</methodname> will return
+ <constant>Memcached::RES_NOTSTORED</constant> if the key does not exist.
</para>
</refsect1>
@@ -85,7 +67,9 @@
&reftitle.seealso;
<para>
<simplelist>
- <member><methodname>Classname::Method</methodname></member>
+ <member><methodname>Memcached::replaceByKey</methodname></member>
+ <member><methodname>Memcached::set</methodname></member>
+ <member><methodname>Memcached::add</methodname></member>
</simplelist>
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/memcached/memcached/replacebykey.xml?r1=1.1&r2=1.2&diff_format=u
Index: phpdoc/en/reference/memcached/memcached/replacebykey.xml
diff -u phpdoc/en/reference/memcached/memcached/replacebykey.xml:1.1
phpdoc/en/reference/memcached/memcached/replacebykey.xml:1.2
--- phpdoc/en/reference/memcached/memcached/replacebykey.xml:1.1 Fri Jan 30 00:04:29 2009
+++ phpdoc/en/reference/memcached/memcached/replacebykey.xml Tue Feb 3 19:12:56 2009
@@ -1,23 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry xml:id="memcached.replacebykey" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::replaceByKey</refname>
- <refpurpose>The replaceByKey purpose</refpurpose>
+ <refpurpose>Replace data under an existing key on a specific server</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier>
<type>void</type><methodname>Memcached::replaceByKey</methodname>
+ <modifier>public</modifier>
<type>bool</type><methodname>Memcached::replaceByKey</methodname>
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
-
<methodparam><type>string</type><parameter>value</parameter></methodparam>
- <methodparam
choice="opt"><type>string</type><parameter>expiration</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
</methodsynopsis>
<para>
- The method description goes here.
+ <function>Memcached::replaceByKey</function> is functionally equivalent to
+ <methodname>Memcached::replace</methodname>, except that the free-form
+ <parameter>server_key</parameter> can be used to map the
+ <parameter>key</parameter> to a specific server. This is useful if you need
+ to keep a bunch of related keys on a certain server.
</para>
</refsect1>
@@ -29,7 +33,7 @@
<term><parameter>server_key</parameter></term>
<listitem>
<para>
- Description...
+ The key identifying the server to store the value on.
</para>
</listitem>
</varlistentry>
@@ -37,7 +41,7 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
- Description...
+ The key under which to store the value.
</para>
</listitem>
</varlistentry>
@@ -45,7 +49,7 @@
<term><parameter>value</parameter></term>
<listitem>
<para>
- Description...
+ The value to store.
</para>
</listitem>
</varlistentry>
@@ -53,7 +57,7 @@
<term><parameter>expiration</parameter></term>
<listitem>
<para>
- Description...
+ The expiration time of the value, as a Unix timestamp.
</para>
</listitem>
</varlistentry>
@@ -64,29 +68,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Description...
- </para>
- </refsect1>
-
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- <title><function>Memcached::replaceByKey</function> example</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-/* ... */
-?>
-]]>
- </programlisting>
- &example.outputs.similar;
- <screen>
-<![CDATA[
-...
-]]>
- </screen>
- </example>
+ &return.success;
+ The <methodname>Memcached::getResultCode</methodname> will return
+ <constant>Memcached::RES_NOTSTORED</constant> if the key does not exist.
</para>
</refsect1>
@@ -94,7 +78,9 @@
&reftitle.seealso;
<para>
<simplelist>
- <member><methodname>Classname::Method</methodname></member>
+ <member><methodname>Memcached::replace</methodname></member>
+ <member><methodname>Memcached::set</methodname></member>
+ <member><methodname>Memcached::add</methodname></member>
</simplelist>
</para>
</refsect1>