mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Document new constants and parameter for getMulti*.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@281728 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9fbf62764b
commit
b21b760799
3 changed files with 104 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
|
||||
<appendix xml:id="memcached.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
|
@ -48,6 +48,13 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.serializer-json">
|
||||
<term><constant>Memcached::SERIALIZER_JSON</constant></term>
|
||||
<listitem>
|
||||
<para>The JSON serializer. Requires PHP 5.2.10+.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.opt-prefix-key">
|
||||
<term><constant>Memcached::OPT_PREFIX_KEY</constant></term>
|
||||
<listitem>
|
||||
|
@ -300,6 +307,32 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.have-igbinary">
|
||||
<term><constant>Memcached::HAVE_IGBINARY</constant></term>
|
||||
<listitem>
|
||||
<para>Indicates whether igbinary serializer support is available.</para>
|
||||
<para>Type: <literal>boolean</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.have-json">
|
||||
<term><constant>Memcached::HAVE_JSON</constant></term>
|
||||
<listitem>
|
||||
<para>Indicates whether JSON serializer support is available.</para>
|
||||
<para>Type: <literal>boolean</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.get-preserve-order">
|
||||
<term><constant>Memcached::GET_PRESERVE_ORDER</constant></term>
|
||||
<listitem>
|
||||
<para>A flag for <function>Memcached::getMulti</function> and
|
||||
<function>Memcached::getMultiByKey</function> to ensure that the keys are
|
||||
returned in the same order as they were requested in. Non-existing keys
|
||||
get a default value of NULL.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="memcached.constants.res-success">
|
||||
<term><constant>Memcached::RES_SUCCESS</constant></term>
|
||||
<listitem>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
|
||||
<refentry xml:id="memcached.getmulti" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
|
@ -13,6 +13,7 @@
|
|||
<modifier>public</modifier> <type>mixed</type><methodname>Memcached::getMulti</methodname>
|
||||
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">cas_tokens</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>integer</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>Memcached::getMulti</function> is similar to
|
||||
|
@ -31,6 +32,13 @@
|
|||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
The <parameter>flags</parameter> parameter can be used to specify
|
||||
additional options for <function>Memcached::getMulti</function>. Currently,
|
||||
the only available option is
|
||||
<constant>Memcached::GET_PRESERVE_ORDER</constant> that ensures that the
|
||||
keys are returned in the same order as they were requested in.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -53,6 +61,14 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The flags for the get operation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -102,6 +118,49 @@ array(2) {
|
|||
["key3"]=>
|
||||
float(2362)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><constant>Memcached::GET_PRESERVE_ORDER</constant> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$m = new Memcached();
|
||||
$m->addServer('localhost', 11211);
|
||||
|
||||
$data = array(
|
||||
'foo' => 'foo-data',
|
||||
'bar' => 'bar-data',
|
||||
'baz' => 'baz-data',
|
||||
'lol' => 'lol-data',
|
||||
'kek' => 'kek-data',
|
||||
);
|
||||
|
||||
$m->setMulti($data, 3600);
|
||||
|
||||
$null = null;
|
||||
$keys = array_keys($data);
|
||||
$keys[] = 'zoo';
|
||||
$got = $m->getMulti($keys, $null, Memcached::GET_PRESERVE_ORDER);
|
||||
|
||||
foreach ($got as $k => $v) {
|
||||
echo "$k $v\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
foo foo-data
|
||||
bar bar-data
|
||||
baz baz-data
|
||||
lol lol-data
|
||||
kek kek-data
|
||||
zoo
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<refentry xml:id="memcached.getmultibykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
|
@ -14,6 +14,7 @@
|
|||
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter role="reference">cas_tokens</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>integer</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>Memcached::getMultiByKey</function> is functionally equivalent to
|
||||
|
@ -51,6 +52,14 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The flags for the get operation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue