replace* docs

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

View file

@ -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>

View file

@ -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>