<?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>
  <refpurpose>Create a Memcached instance</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <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>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">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>persistent_id</parameter></term>
     <listitem>
      <para>
       By default the Memcached instances are destroyed at the end of the
       request. To create an instance that persists between requests, use
       <parameter>persistent_id</parameter> to specify a unique ID for the
       instance. All instances created with the same
       <parameter>persistent_id</parameter> will share the same connection.
      </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>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Creating a Memcached object</title>
    <programlisting role="php">
<![CDATA[
<?php
/* Create a regular instance */
$m = new Memcached();
echo get_class($m);

/* Create a persistent instance */
$m2 = new Memcached('story_pool');
$m3 = new Memcached('story_pool');

/* now $m2 and $m3 share the same connection */
?>
]]>
    </programlisting>
   </example>
  </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:"~/.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
-->
