mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added gridfs get, put, & delete
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299359 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
84c6f6bcf4
commit
1d1e6ff643
4 changed files with 200 additions and 0 deletions
62
reference/mongo/mongogridfs/delete.xml
Normal file
62
reference/mongo/mongogridfs/delete.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="mongogridfs.delete" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoGridFS::delete</refname>
|
||||
<refpurpose>Delete a file from the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>boolean</type><methodname>MongoGridFS::delete</methodname>
|
||||
<methodparam><type>mixed</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>id</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>_id</literal> of the file to remove.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns if the remove was successfully sent to the database.
|
||||
</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:"~/.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/mongo/mongogridfs/get.xml
Normal file
62
reference/mongo/mongogridfs/get.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="mongogridfs.get" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoGridFS::get</refname>
|
||||
<refpurpose>Retrieve a file from the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>MongoGridFSFile</type><methodname>MongoGridFS::get</methodname>
|
||||
<methodparam><type>mixed</type><parameter>id</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>id</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>_id</literal> of the file to find.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the file, if found, or &null;.
|
||||
</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:"~/.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
|
||||
-->
|
73
reference/mongo/mongogridfs/put.xml
Normal file
73
reference/mongo/mongogridfs/put.xml
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="mongogridfs.put" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoGridFS::put</refname>
|
||||
<refpurpose>Stores a file in the database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>mixed</type><methodname>MongoGridFS::put</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>extra</parameter><initializer>array()</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>filename</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>extra</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Other metadata to add to the file saved.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the <literal>_id</literal> of the saved object.
|
||||
</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:"~/.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,6 +100,9 @@
|
|||
<function name='mongogridfs::storefile' from='PECL mongo >=0.9.0'/>
|
||||
<function name='mongogridfs::storeupload' from='PECL mongo >=0.9.0'/>
|
||||
<function name='mongogridfs::storebytes' from='PECL mongo >=0.9.2'/>
|
||||
<function name='mongogridfs::get' from='PECL mongo >=1.0.8'/>
|
||||
<function name='mongogridfs::put' from='PECL mongo >=1.0.8'/>
|
||||
<function name='mongogridfs::delete' from='PECL mongo >=1.0.8'/>
|
||||
<!-- MongoGridFSFile -->
|
||||
<function name='mongogridfsfile::__construct' from='PECL mongo >=0.9.0'/>
|
||||
<function name='mongogridfsfile::getbytes' from='PECL mongo >=0.9.0'/>
|
||||
|
|
Loading…
Reference in a new issue