Skip to content

Commit

Permalink
Sync docs with Memcached stubs (#1849)
Browse files Browse the repository at this point in the history
* Sync docs with Memcached stubs

See: https://github.com/php-memcached-dev/php-memcached

* Run gen_stub.php --replace-classsynopses
  • Loading branch information
Girgias authored Aug 4, 2023
1 parent 8a0ab24 commit 1d8068e
Show file tree
Hide file tree
Showing 52 changed files with 179 additions and 237 deletions.
13 changes: 6 additions & 7 deletions reference/memcached/memcached.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<phpdoc:classref xml:id="class.memcached" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

<title>The Memcached class</title>
Expand All @@ -22,20 +21,21 @@

<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>Memcached</classname></ooclass>
<ooclass>
<classname>Memcached</classname>
</ooclass>

<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Memcached</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->

<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcached')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])">
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcached')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='Memcached'])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcached')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])">
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcached')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Memcached'])">
<xi:fallback/>
</xi:include>
</classsynopsis>
Expand All @@ -48,7 +48,6 @@
&reference.memcached.entities.memcached;

</phpdoc:classref>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
6 changes: 2 additions & 4 deletions reference/memcached/memcached/add.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.add" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::add</refname>
Expand All @@ -9,11 +8,11 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::add</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<function>Memcached::add</function> is similar to
Expand Down Expand Up @@ -75,7 +74,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
6 changes: 2 additions & 4 deletions reference/memcached/memcached/addbykey.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.addbykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::addByKey</refname>
Expand All @@ -9,12 +8,12 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::addByKey</methodname>
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<function>Memcached::addByKey</function> is functionally equivalent to
Expand Down Expand Up @@ -86,7 +85,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
4 changes: 1 addition & 3 deletions reference/memcached/memcached/addserver.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.addserver" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::addServer</refname>
Expand All @@ -9,7 +8,7 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::addServer</methodname>
<methodparam><type>string</type><parameter>host</parameter></methodparam>
<methodparam><type>int</type><parameter>port</parameter></methodparam>
Expand Down Expand Up @@ -117,7 +116,6 @@ $m->addServer('mem2.domain.com', 11211, 67);
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
4 changes: 1 addition & 3 deletions reference/memcached/memcached/addservers.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.addservers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::addServers</refname>
Expand All @@ -9,7 +8,7 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::addServers</methodname>
<methodparam><type>array</type><parameter>servers</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -84,7 +83,6 @@ $m->addServers($servers);
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
17 changes: 11 additions & 6 deletions reference/memcached/memcached/append.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.append" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::append</refname>
Expand All @@ -9,8 +8,8 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Memcached::append</methodname>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type class="union"><type>bool</type><type>null</type></type><methodname>Memcached::append</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -58,8 +57,15 @@
&reftitle.returnvalues;
<para>
&return.success;
The <methodname>Memcached::getResultCode</methodname> will return
<constant>Memcached::RES_NOTSTORED</constant> if the key does not exist.
Returns &null; when compression is on.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
Returns &null; and raises an <constant>E_WARNING</constant> when
compression is enabled.
</para>
</refsect1>

Expand Down Expand Up @@ -102,7 +108,6 @@ string(6) "abcdef"
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
17 changes: 11 additions & 6 deletions reference/memcached/memcached/appendbykey.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.appendbykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::appendByKey</refname>
Expand All @@ -9,8 +8,8 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Memcached::appendByKey</methodname>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type class="union"><type>bool</type><type>null</type></type><methodname>Memcached::appendByKey</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>
Expand Down Expand Up @@ -59,8 +58,15 @@
&reftitle.returnvalues;
<para>
&return.success;
The <methodname>Memcached::getResultCode</methodname> will return
<constant>Memcached::RES_NOTSTORED</constant> if the key does not exist.
Returns &null; when compression is on.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
Returns &null; and raises an <constant>E_WARNING</constant> when
compression is enabled.
</para>
</refsect1>

Expand All @@ -75,7 +81,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
8 changes: 3 additions & 5 deletions reference/memcached/memcached/cas.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.cas" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::cas</refname>
Expand All @@ -9,12 +8,12 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::cas</methodname>
<methodparam><type>float</type><parameter>cas_token</parameter></methodparam>
<methodparam><type class="union"><type>string</type><type>int</type><type>float</type></type><parameter>cas_token</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<function>Memcached::cas</function> performs a "check and set" operation,
Expand Down Expand Up @@ -122,7 +121,6 @@ do {
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
8 changes: 3 additions & 5 deletions reference/memcached/memcached/casbykey.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.casbykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::casByKey</refname>
Expand All @@ -9,13 +8,13 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::casByKey</methodname>
<methodparam><type>float</type><parameter>cas_token</parameter></methodparam>
<methodparam><type class="union"><type>string</type><type>int</type><type>float</type></type><parameter>cas_token</parameter></methodparam>
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<function>Memcached::casByKey</function> is functionally equivalent to
Expand Down Expand Up @@ -94,7 +93,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
25 changes: 21 additions & 4 deletions reference/memcached/memcached/construct.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::__construct</refname>
Expand All @@ -9,14 +8,17 @@

<refsect1 role="description">
&reftitle.description;
<constructorsynopsis>
<constructorsynopsis role="Memcached">
<modifier>public</modifier> <methodname>Memcached::__construct</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>persistent_id</parameter><initializer>null</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>persistent_id</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>callable</type><type>null</type></type><parameter>callback</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>connection_str</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
Creates a Memcached instance representing the connection to the memcache
servers.
</para>
&warn.undocumented.func;
</refsect1>

<refsect1 role="parameters">
Expand All @@ -35,6 +37,22 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>callback</parameter></term>
<listitem>
<para>
<!-- TODO Document constructor params -->
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>connection_str</parameter></term>
<listitem>
<para>
<!-- TODO Document constructor params -->
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
Expand Down Expand Up @@ -64,7 +82,6 @@ $m3 = new Memcached('story_pool');
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
4 changes: 1 addition & 3 deletions reference/memcached/memcached/decrement.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="memcached.decrement" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::decrement</refname>
Expand All @@ -9,7 +8,7 @@

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>Memcached::decrement</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>1</initializer></methodparam>
Expand Down Expand Up @@ -125,7 +124,6 @@ bool(false)
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
Loading

0 comments on commit 1d8068e

Please sign in to comment.