Files
doc-fr/reference/memcache/functions/memcache-replace.xml
Yannick Torres 4a239ae2da use more entitie
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@172818 c90b9560-bf6c-de11-be94-00142212c4b1
2004-11-16 22:07:23 +00:00

80 lines
2.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- EN-Revision: 1.1 Maintainer: yannick Status: ready -->
<refentry id="function.Memcache-replace">
<refnamediv>
<refname>Memcache::replace</refname>
<refpurpose>Remplace une valeur d'un élément existant</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>Memcache::replace</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flag</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
</methodsynopsis>
<para>
<function>Memcache::replace</function> est utilisé pour remplacer la valeur
d'un élément identifié par la clé <parameter>key</parameter>. Dans le cas où
l'élément identifié par la clé <parameter>key</parameter> n'existe pas,
la fonction <function>Memcache::replace</function> retournera &false;.
Pour le reste, la fonction <function>Memcache::replace</function> fonctionne
de la même façon que la fonction <function>Memcache::set</function>.
</para>
<para>
Vous pouvez également utiliser la fonction
<function>memcache_replace</function>.
Regardez l'exemple ci-dessous.
</para>
<example>
<title>Exemple avec <function>Memcache::replace</function></title>
<programlisting role="php">
<![CDATA[
<?php
$memcache_obj = memcache_connect('memcache_host', 11211);
/* API procédurale */
memcache_replace($memcache_obj, "test_key", "some variable", false, 30);
/* API orientée objet */
$memcache_obj->replace("test_key", "some variable", false, 30);
?>
]]>
</programlisting>
</example>
<para>
&return.success;
</para>
<para>
Voir aussi
<function>Memcache::set</function> et
<function>Memcache::add</function>.
</para>
</refsect1>
</refentry>
<!-- 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:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->