mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added missing APC documentation. Note: some parts need additional work still.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299728 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
40a12b7bfc
commit
aea2855eea
26 changed files with 2120 additions and 2 deletions
80
reference/apc/apciterator.xml
Normal file
80
reference/apc/apciterator.xml
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.apciterator" 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 APCIterator class</title>
|
||||
<titleabbrev>APCIterator</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ APCIterator intro -->
|
||||
<section xml:id="apciterator.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The <classname>APCIterator</classname> class makes it easier to iterate
|
||||
over large APC caches. This is helpful as it allows iterating over large
|
||||
caches in steps, while grabbing a defined number of entries per lock instance,
|
||||
so it frees the cache locks for other activities rather than hold up the
|
||||
entire cache to grab 100 (the default) entries. Also, using regular expression
|
||||
matching is more efficient as it's been moved to the C level.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="apciterator.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>APCIterator</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>APCIterator</classname>
|
||||
</ooclass>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Iterator</interfacename>
|
||||
</oointerface>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Traversable</interfacename>
|
||||
</oointerface>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.apciterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.apc.entities.apciterator;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"~/.phpdoc/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
|
||||
-->
|
115
reference/apc/apciterator/construct.xml
Normal file
115
reference/apc/apciterator/construct.xml
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::__construct</refname>
|
||||
<refpurpose>Constructs an APCIterator iterator object</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>APCIterator::__construct</methodname>
|
||||
<methodparam><type>string</type><parameter>cache</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>search</parameter><initializer>null</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>format</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter><initializer>100</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>list</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Constructs an <classname>APCIterator</classname> <type>object</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>cache</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The cache type, which will be <literal>user</literal> or
|
||||
<literal>file</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>search</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <link linkend="book.pcre">PCRE</link> regular expression that
|
||||
matches against APC key names, either as a <type>string</type> for
|
||||
a single regular expression, or as an <type>array</type> of regular
|
||||
expressions. Or, optionally pass in &null; to skip the search.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The desired format, as configured with one ore more of the
|
||||
<link linkend="apc.constants">APC_ITER_*</link> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>chunk_size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The chunk size. Must be a value greater than 0. The default
|
||||
value is 100.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>list</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type to list. Either pass in <constant>APC_LIST_ACTIVE</constant>
|
||||
or <constant>APC_LIST_INACTIVE</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An <classname>APCIterator</classname> <type>object</type> on success,
|
||||
or &null; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_exists</function></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
63
reference/apc/apciterator/current.xml
Normal file
63
reference/apc/apciterator/current.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.current" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::current</refname>
|
||||
<refpurpose>Get current item</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>mixed</type><methodname>APCIterator::current</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the current item from the <classname>APCIterator</classname> stack.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current item on success, or &false; if no
|
||||
more items or exist, or on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::next</methodname></member>
|
||||
<member><methodname>Iterator::current</methodname></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
66
reference/apc/apciterator/gettotalcount.xml
Normal file
66
reference/apc/apciterator/gettotalcount.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.gettotalcount" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::getTotalCount</refname>
|
||||
<refpurpose>Get total count</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>integer</type><methodname>APCIterator::getTotalCount</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the total count.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The total count.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::getTotalHits</methodname></member>
|
||||
<member><methodname>APCIterator::getTotalSize</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
66
reference/apc/apciterator/gettotalhits.xml
Normal file
66
reference/apc/apciterator/gettotalhits.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.gettotalhits" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::getTotalHits</refname>
|
||||
<refpurpose>Get total cache hits</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>integer</type><methodname>APCIterator::getTotalHits</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the total number of cache hits.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The number of hits on success, or &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::getTotalCount</methodname></member>
|
||||
<member><methodname>APCIterator::getTotalSize</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
66
reference/apc/apciterator/gettotalsize.xml
Normal file
66
reference/apc/apciterator/gettotalsize.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.gettotalsize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::getTotalSize</refname>
|
||||
<refpurpose>Get total cache size</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>APCIterator::getTotalSize</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the total cache size.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The total cache size.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::getTotalCount</methodname></member>
|
||||
<member><methodname>APCIterator::getTotalHits</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
62
reference/apc/apciterator/key.xml
Normal file
62
reference/apc/apciterator/key.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.key" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::key</refname>
|
||||
<refpurpose>Get iterator key</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>APCIterator::key</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the current iterator key.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the key on success, or &false; upon failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::current</methodname></member>
|
||||
<member><methodname>Iterator::key</methodname></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
63
reference/apc/apciterator/next.xml
Normal file
63
reference/apc/apciterator/next.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.next" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::next</refname>
|
||||
<refpurpose>Move pointer to next item</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCIterator::next</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Moves the iterator pointer to the next element.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::current</methodname></member>
|
||||
<member><methodname>APCIterator::rewind</methodname></member>
|
||||
<member><methodname>Iterator::next</methodname></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
62
reference/apc/apciterator/rewind.xml
Normal file
62
reference/apc/apciterator/rewind.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.rewind" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::rewind</refname>
|
||||
<refpurpose>Rewinds iterator</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCIterator::rewind</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Rewinds back the iterator to the first element.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::next</methodname></member>
|
||||
<member><methodname>Iterator::next</methodname></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
62
reference/apc/apciterator/valid.xml
Normal file
62
reference/apc/apciterator/valid.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="apciterator.valid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCIterator::valid</refname>
|
||||
<refpurpose>Checks if current position is valid</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCIterator::valid</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks if the current iterator position is valid.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the current iterator position is valid, otherwise &false;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCIterator::current</methodname></member>
|
||||
<member><methodname>Iterator::valid</methodname></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
|
@ -19,6 +19,7 @@
|
|||
&reference.apc.setup;
|
||||
&reference.apc.constants;
|
||||
&reference.apc.reference;
|
||||
&reference.apc.apciterator;
|
||||
|
||||
</book>
|
||||
|
||||
|
|
|
@ -3,7 +3,243 @@
|
|||
|
||||
<appendix xml:id="apc.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&no.constants;
|
||||
&extension.constants;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_BIN_VERIFY_CRC32</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_BIN_VERIFY_MD5</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_ALL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_ATIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_CTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_DEVICE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_DTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_FILENAME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_INODE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_KEY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_MD5</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_MEM_SIZE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_MTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_NONE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_NUM_HITS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_REFCOUNT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_TTL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_TYPE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_ITER_VALUE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_LIST_ACTIVE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>APC_LIST_DELETED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@ -26,4 +262,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
|||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
|
85
reference/apc/functions/apc-bin-dump.xml
Normal file
85
reference/apc/functions/apc-bin-dump.xml
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-bin-dump" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_bin_dump</refname>
|
||||
<refpurpose>Get a binary dump of the given files and user variables</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>apc_bin_dump</methodname>
|
||||
<methodparam choice="opt"><type>array</type><parameter>files</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>user_vars</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a binary dump of the given files and user variables from the APC cache.
|
||||
A &null; for files or user_vars signals a dump of every entry, whereas array() will dump
|
||||
nothing.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>files</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The files. Passing in &null; signals a dump of every entry, while
|
||||
passing in <function>array</function> will dump nothing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>user_vars</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The user vars. Passing in &null; signals a dump of every entry, while
|
||||
passing in <function>array</function> will dump nothing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a binary dump of the given files and user variables from the APC cache,
|
||||
&false; if APC is not enabled, or &null; if an unknown error is encountered.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_bin_dumpfile</function></member>
|
||||
<member><function>apc_bin_load</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
113
reference/apc/functions/apc-bin-dumpfile.xml
Normal file
113
reference/apc/functions/apc-bin-dumpfile.xml
Normal file
|
@ -0,0 +1,113 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-bin-dumpfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_bin_dumpfile</refname>
|
||||
<refpurpose>Output a binary dump of cached files and user variables to a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apc_bin_dumpfile</methodname>
|
||||
<methodparam><type>array</type><parameter>files</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>user_vars</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Outputs a binary dump of the given files and user variables from the APC
|
||||
cache to the named file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>files</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file names being dumped.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>user_vars</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The user variables being dumped.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The filename where the dump is being saved.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Flags passed to the <parameter>filename</parameter> stream. See the
|
||||
<function>file_put_contents</function> documentation for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The context passed to the <parameter>filename</parameter> stream. See the
|
||||
<function>file_put_contents</function> documentation for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The number of bytes written to the file, otherwise
|
||||
&false; if APC is not enabled, <parameter>filename</parameter> is an invalid file name,
|
||||
<parameter>filename</parameter> can't be opened, the file dump can't be completed
|
||||
(e.g., the hard drive is out of disk space), or an unknown error was encountered.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_bin_dump</function></member>
|
||||
<member><function>apc_bin_load</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
100
reference/apc/functions/apc-bin-load.xml
Normal file
100
reference/apc/functions/apc-bin-load.xml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-bin-load" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_bin_load</refname>
|
||||
<refpurpose>Load a binary dump into the APC file/user cache</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apc_bin_load</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Loads the given binary dump into the APC file/user cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The binary dump being loaded, likely from
|
||||
<function>apc_bin_dump</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Either <constant>APC_BIN_VERIFY_CRC32</constant>, <constant>APC_BIN_VERIFY_MD5</constant>,
|
||||
or both.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the binary dump <parameter>data</parameter> was loaded
|
||||
with success, otherwise &false; is returned. &false; is returned if APC
|
||||
is not enabled, or if the <parameter>data</parameter> is not a valid APC
|
||||
binary dump (e.g., unexpected size).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_bin_load</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$data = apc_bin_dump(NULL, NULL);
|
||||
apc_bin_load($data, APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_bin_dump</function></member>
|
||||
<member><function>apc_bin_loadfile</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
94
reference/apc/functions/apc-bin-loadfile.xml
Normal file
94
reference/apc/functions/apc-bin-loadfile.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-bin-loadfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_bin_loadfile</refname>
|
||||
<refpurpose>Load a binary dump from a file into the APC file/user cache</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apc_bin_loadfile</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Loads a binary dump from a file into the APC file/user cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file name containing the dump, likely from
|
||||
<function>apc_bin_dumpfile</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The files context.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Either <constant>APC_BIN_VERIFY_CRC32</constant>, <constant>APC_BIN_VERIFY_MD5</constant>,
|
||||
or both.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; on success, otherwise &false; Reasons it may return &false; include
|
||||
APC is not enabled, <parameter>filename</parameter> is an invalid file name or empty,
|
||||
<parameter>filename</parameter> can't be opened, the file dump can't be completed, or
|
||||
if the <parameter>data</parameter> is not a valid APC binary dump (e.g., unexpected
|
||||
size).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_bin_dumpfile</function></member>
|
||||
<member><function>apc_bin_load</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
|
@ -151,6 +151,9 @@ Array
|
|||
<para>
|
||||
<simplelist>
|
||||
<member><link linkend="apc.configuration">APC configuration directives</link></member>
|
||||
<member><methodname>APCIterator::getTotalSize</methodname></member>
|
||||
<member><methodname>APCIterator::getTotalHits</methodname></member>
|
||||
<member><methodname>APCIterator::getTotalCount</methodname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
131
reference/apc/functions/apc-cas.xml
Normal file
131
reference/apc/functions/apc-cas.xml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-cas" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_cas</refname>
|
||||
<refpurpose>apc_cas</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apc_cas</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>old</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>new</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
apc_cas
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>old</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>new</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_cas</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
apc_store('foobar',2);
|
||||
echo '$foobar = 2', PHP_EOL;
|
||||
echo '$foobar == 1 ? 2 : 1 = ', (apc_cas('foobar', 1, 2) ? 'ok' : 'fail'), PHP_EOL;
|
||||
echo '$foobar == 2 ? 1 : 2 = ', (apc_cas('foobar', 2, 1) ? 'ok' : 'fail'), PHP_EOL;
|
||||
|
||||
echo '$foobar = ', apc_fetch('foobar'), PHP_EOL;
|
||||
|
||||
echo '$f__bar == 1 ? 2 : 1 = ', (apc_cas('f__bar', 1, 2) ? 'ok' : 'fail'), PHP_EOL;
|
||||
|
||||
apc_store('perfection', 'xyz');
|
||||
echo '$perfection == 2 ? 1 : 2 = ', (apc_cas('perfection', 2, 1) ? 'ok' : 'epic fail'), PHP_EOL;
|
||||
|
||||
echo '$foobar = ', apc_fetch('foobar'), PHP_EOL;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
$foobar = 2
|
||||
$foobar == 1 ? 2 : 1 = fail
|
||||
$foobar == 2 ? 1 : 2 = ok
|
||||
$foobar = 1
|
||||
$f__bar == 1 ? 2 : 1 = fail
|
||||
$perfection == 2 ? 1 : 2 = epic fail
|
||||
$foobar = 1
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_dec</function></member>
|
||||
<member><function>apc_store</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
|
@ -42,6 +42,14 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_bin_dumpfile</function></member>
|
||||
<member><function>apc_bin_loadfile</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
139
reference/apc/functions/apc-dec.xml
Normal file
139
reference/apc/functions/apc-dec.xml
Normal file
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-dec" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_dec</refname>
|
||||
<refpurpose>Decrease a stored number</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apc_dec</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>step</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter role="reference">success</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Decreases a stored integer value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of the value being decreased.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>step</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The step, or value to decrease.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>success</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally pass the success or fail boolean value to
|
||||
this referenced variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current value of <parameter>key</parameter>'s value on success,
|
||||
&return.falseforfailure;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_dec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo "Let's do something with success", PHP_EOL;
|
||||
|
||||
apc_store('anumber', 42);
|
||||
|
||||
echo apc_fetch('anumber'), PHP_EOL;
|
||||
|
||||
echo apc_dec('anumber'), PHP_EOL;
|
||||
echo apc_dec('anumber', 10), PHP_EOL;
|
||||
echo apc_dec('anumber', 10, $success), PHP_EOL;
|
||||
|
||||
var_dump($success);
|
||||
|
||||
echo "Now, let's fail", PHP_EOL, PHP_EOL;
|
||||
|
||||
apc_store('astring', 'foo');
|
||||
|
||||
$ret = apc_dec('astring', 1, $fail);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($fail);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Let's do something with success
|
||||
42
|
||||
41
|
||||
31
|
||||
21
|
||||
bool(true)
|
||||
|
||||
Now, let's fail
|
||||
bool(false)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_inc</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
120
reference/apc/functions/apc-delete-file.xml
Normal file
120
reference/apc/functions/apc-delete-file.xml
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-delete-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_delete_file</refname>
|
||||
<refpurpose>Deletes files from the opcode cache</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apc_delete_file</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Deletes the given files from the opcode cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The files to be deleted. Accepts a <type>string</type>,
|
||||
<type>array</type> of strings, or an <classname>APCIterator</classname>
|
||||
<type>object</type>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
Or if <parameter>keys</parameter> is an <type>array</type>, then
|
||||
an empty array is returned on success, or an array of failed files
|
||||
is returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_delete_file</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$filename = 'file.php';
|
||||
|
||||
if (apc_compile_file($filename)) {
|
||||
|
||||
if (apc_delete_file($filename)) {
|
||||
echo "Successfully deleted file $filename from APC cache.", PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if (apc_compile_file($filename)) {
|
||||
|
||||
if ($good = apc_delete_file(array($filename, 'donotexist.php'))) {
|
||||
var_dump($good);
|
||||
}
|
||||
}
|
||||
|
||||
$bad = apc_delete_file('donotexist.php');
|
||||
var_dump($bad);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Successfully deleted file file.php from APC cache.
|
||||
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 13.
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(14) "donotexist.php"
|
||||
}
|
||||
[Mon May 24 09:30:33 2010] [apc-warning] Could not stat file donotexist.php, unable to delete from cache. in /tmp/test.php on line 18.
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_clear_cache</function></member>
|
||||
<member><function>apc_delete</function></member>
|
||||
<member><function>apc_exists</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
125
reference/apc/functions/apc-exists.xml
Normal file
125
reference/apc/functions/apc-exists.xml
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-exists" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_exists</refname>
|
||||
<refpurpose>Checks if APC key exists</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apc_exists</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks if one ore more APC keys exist.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type>, or an <type>array</type> of strings, that
|
||||
contain keys.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the key exists, otherwise &false; Or if an
|
||||
<type>array</type> was passed to <parameter>keys</parameter>, then
|
||||
an array is returned that contains all existing keys, or an empty
|
||||
array if none exist.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_exists</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fruit = 'apple';
|
||||
$veggie = 'carrot';
|
||||
|
||||
apc_store('foo', $fruit);
|
||||
apc_store('bar', $veggie);
|
||||
|
||||
if (apc_exists('foo')) {
|
||||
echo "Foo exists: ";
|
||||
echo apc_fetch('foo');
|
||||
} else {
|
||||
echo "Foo does not exist";
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
if (apc_exists('baz')) {
|
||||
echo "Baz exists.";
|
||||
} else {
|
||||
echo "Baz does not exist";
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
$ret = apc_exists(array('foo', 'donotexist', 'bar'));
|
||||
var_dump($ret);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Foo exists: apple
|
||||
Baz does not exist
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
bool(true)
|
||||
["bar"]=>
|
||||
bool(true)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
<member><function>apc_fetch</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
|
@ -74,12 +74,35 @@ string(3) "BAR"
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>3.0.17</entry>
|
||||
<entry>
|
||||
The <parameter>success</parameter> parameter was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apc_store</function></member>
|
||||
<member><function>apc_delete</function></member>
|
||||
<member><classname>APCIterator</classname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
137
reference/apc/functions/apc-inc.xml
Normal file
137
reference/apc/functions/apc-inc.xml
Normal file
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.apc-inc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apc_inc</refname>
|
||||
<refpurpose>Increase a stored number</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apc_inc</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>step</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter role="reference">success</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Increases a stored number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of the value being decreased.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>step</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The step, or value to increase.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>success</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally pass the success or fail boolean value to
|
||||
this referenced variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current value of <parameter>key</parameter>'s value on success,
|
||||
&return.falseforfailure;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apc_inc</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo "Let's do something with success", PHP_EOL;
|
||||
|
||||
apc_store('anumber', 42);
|
||||
|
||||
echo apc_fetch('anumber'), PHP_EOL;
|
||||
|
||||
echo apc_inc('anumber'), PHP_EOL;
|
||||
echo apc_inc('anumber', 10), PHP_EOL;
|
||||
echo apc_inc('anumber', 10, $success), PHP_EOL;
|
||||
|
||||
var_dump($success);
|
||||
|
||||
echo "Now, let's fail", PHP_EOL, PHP_EOL;
|
||||
|
||||
apc_store('astring', 'foo');
|
||||
|
||||
$ret = apc_inc('astring', 1, $fail);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($fail);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
42
|
||||
43
|
||||
53
|
||||
63
|
||||
bool(true)
|
||||
Now, let's fail
|
||||
|
||||
bool(false)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_dec</function></member>
|
||||
</simplelist>
|
||||
</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:"~/.phpdoc/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
|
||||
-->
|
|
@ -140,6 +140,12 @@
|
|||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.7.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.use-request-time">apc.use_request_time</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>Available since APC 3.1.3.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.stat">apc.stat</link></entry>
|
||||
<entry>"1"</entry>
|
||||
|
@ -188,6 +194,12 @@
|
|||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.rfc1867-ttl">apc.rfc1867_ttl</link></entry>
|
||||
<entry>"3600"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.localcache">apc.localcache</link></entry>
|
||||
<entry>"0"</entry>
|
||||
|
@ -212,6 +224,24 @@
|
|||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.13.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.preload-path">apc.preload_path</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.file-md5">apc.file_md5</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apc.canonicalize">apc.canonicalize</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -674,6 +704,18 @@ Array
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.rfc1867-ttl">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_ttl</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<acronym>TTL</acronym> for rfc1867 entries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.localcache">
|
||||
<term>
|
||||
<parameter>apc.localcache</parameter>
|
||||
|
@ -746,6 +788,54 @@ Array
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.canonicalize">
|
||||
<term>
|
||||
<parameter>apc.canonicalize</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If on, then relative paths are canonicalized in no-stat mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.preload-path">
|
||||
<term>
|
||||
<parameter>apc.preload_path</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.use-request-time">
|
||||
<term>
|
||||
<parameter>apc.use_request_time</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use the <acronym>SAPI</acronym> request start time for
|
||||
<acronym>TTL</acronym>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apc.file-md5">
|
||||
<term>
|
||||
<parameter>apc.file_md5</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Records a md5 hash of files.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
|
|
@ -5,12 +5,21 @@
|
|||
-->
|
||||
<versions>
|
||||
<function name='apc_add' from='PECL apc >= 3.0.13'/>
|
||||
<function name='apc_bin_dump' from='PECL apc >= 3.1.4'/>
|
||||
<function name='apc_bin_dumpfile' from='PECL apc >= 3.1.4'/>
|
||||
<function name='apc_bin_load' from='PECL apc >= 3.1.4'/>
|
||||
<function name='apc_bin_loadfile' from='PECL apc >= 3.1.4'/>
|
||||
<function name='apc_cache_info' from='PECL apc >= 2.0.0'/>
|
||||
<function name='apc_cas' from='PECL apc >= 3.1.1'/>
|
||||
<function name='apc_clear_cache' from='PECL apc >= 2.0.0'/>
|
||||
<function name='apc_compile_file' from='PECL apc >= 3.0.13'/>
|
||||
<function name='apc_dec' from='PECL apc >= 3.1.1'/>
|
||||
<function name='apc_define_constants' from='PECL apc >= 3.0.0'/>
|
||||
<function name='apc_delete' from='PECL apc >= 3.0.0'/>
|
||||
<function name='apc_delete_file' from='PECL apc >= 3.1.1'/>
|
||||
<function name='apc_exists' from='PECL apc >= 3.1.4'/>
|
||||
<function name='apc_fetch' from='PECL apc >= 3.0.0'/>
|
||||
<function name='apc_inc' from='PECL apc >= 3.1.1'/>
|
||||
<function name='apc_load_constants' from='PECL apc >= 3.0.0'/>
|
||||
<function name='apc_sma_info' from='PECL apc >= 2.0.0'/>
|
||||
<function name='apc_store' from='PECL apc >= 3.0.0'/>
|
||||
|
|
Loading…
Reference in a new issue