2009-05-20 22:31:40 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
2009-07-11 08:06:30 +00:00
|
|
|
<!-- $Revision$ -->
|
2009-05-20 22:31:40 +00:00
|
|
|
<refentry xml:id="mongogridfs.--construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>MongoGridFS::__construct</refname>
|
|
|
|
<refpurpose>Creates new file collections</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<methodname>MongoGridFS::__construct</methodname>
|
|
|
|
<methodparam><type>MongoDB</type><parameter>db</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>files</parameter><initializer>&null;</initializer></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>chunks</parameter><initializer>&null;</initializer></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Files as stored across two collections, the first containing file meta information, the
|
|
|
|
second containing chunks of the actual file. By default, fs.files and fs.chunks are the
|
|
|
|
collection names used.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Use one argument to specify a prefix other than "fs":
|
|
|
|
<![CDATA[
|
|
|
|
$fs = new MongoGridFS($db, "myfiles");
|
|
|
|
]]>
|
|
|
|
uses myfiles.files and myfiles.chunks collections.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Use two arguments to fully specify the collection names:
|
|
|
|
<![CDATA[
|
|
|
|
$fs = new MongoGridFS($db, "myfiles", "mychunks");
|
|
|
|
]]>
|
|
|
|
uses myfiles and mychunks collections.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<parameter>db</parameter>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Database.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<parameter>files</parameter>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Optional files collection name. If chunks is not given,
|
|
|
|
<literal>files</literal> is used as both collections' prefix.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<parameter>chunks</parameter>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Optional chunks collection name.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</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
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|